I have the following code and I am using a library to list the citizen's card fields.
How much do I try to run in DOS does not work.
import java.io.*;
import pteidlib.*;
public class main {
public String nome;
public String data;
public String pais;
public String sexo;
static
{
try
{
System.loadLibrary("pteidlibj");
}
catch (UnsatisfiedLinkError e)
{
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public void PrintIDData(PTEID_ID idData) throws FileNotFoundException, UnsupportedEncodingException
{
nome = idData.firstname + " " + idData.name ;
data = idData.birthDate;
pais = idData.country;
sexo = idData.sex;
PrintWriter writer = new PrintWriter("the-file-name.txt", "UTF-8");
writer.println(nome);
writer.println(data);
writer.close();
System.out.print(nome);
}
public static void main(String[] args) throws UnsupportedEncodingException, FileNotFoundException, PteidException{
main test = new main();
pteid.Init("");
//test.TestChangeAddress();
// Don't check the integrity of the ID, address and photo (!)
pteid.SetSODChecking(false);
int cardtype = pteid.GetCardType();
switch (cardtype)
{
case pteid.CARD_TYPE_IAS07:
System.out.println("IAS 0.7 card\n");
break;
case pteid.CARD_TYPE_IAS101:
System.out.println("IAS 1.0.1 card\n");
break;
case pteid.CARD_TYPE_ERR:
System.out.println("Unable to get the card type\n");
break;
default:
System.out.println("Unknown card type\n");
}
// Read ID Data
PTEID_ID idData = pteid.GetID();
if (null != idData)
{
test.PrintIDData(idData);
}
}
}
I need to run this on the command line java -cp test.jar main
so after being called on the command line give me this error: