Martin Paljak-2 wrote:
>
> On Mar 3, 2010, at 00:21 , guides wrote:
>> In config file i put:
>> PCSCDIR=/usr/local
>> JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.15
>>
>> Can someone help me to solve the problem please?
>
>
> You don't need jpcsc with 1.6, use javax.smartcardio.
>
> http://java.sun.com/javase/6/docs/jre/api/security/smartcardio/spec/javax/smartcardio/package-summary.html
>
> --
> Martin Paljak
> http://martin.paljak.pri.ee
> +3725156495
>
>
>
> _______________________________________________
> Muscle mailing list
> [email protected]
> http://lists.drizzle.com/mailman/listinfo/muscle
>
>
Ok, i try with javax.smartcardio, but now i have this code:
TerminalFactory tf = TerminalFactory.getDefault();
CardTerminals ct = tf.terminals();
List<CardTerminal> l = null;
Card card = null;
try {
l = ct.list();
} catch (Exception e) {
System.out.println("Error listing Terminals: " + e.toString());
}
System.out.println("List of PC/SC Readers connected:");
ListIterator i = l.listIterator();
while (i.hasNext()) {
System.out.println("Reader: " + ((CardTerminal) i.next()).getName());
}
CardTerminal c = ct.getTerminal("Gemplus USB SmartCard Reader 0");
try {
while (c.isCardPresent()) {
try {
Thread.sleep(100);
} catch (Exception e) {
System.out.print(("Error Sleep"));
}
try {
card = c.connect("T=1");
System.out.println("Terminal connected");
} catch (Exception e) {
}
String a = card.getATR().toString();
The application gives me the error "Null pointer exception" when try the
last line. What i'm doing wrong? I'm working with EMV cards.
--
View this message in context:
http://old.nabble.com/jpcsc-error-tp27761635p27771052.html
Sent from the MuscleCard mailing list archive at Nabble.com.
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle