1

I use gpj tool to communicate with my smart card reader. It works fine. For example when I want to list the applets that reside on my card I use parameter -list and I have the below out put :

E:\RCII Projects Data\Smart Card\SOFT\gpj>gpj -list

E:\RCII Projects Data\Smart Card\SOFT\gpj>java -jar gpj.jar -list
Found terminals: [PC/SC terminal ACS CCID USB Reader 0]
Found card in terminal: ACS CCID USB Reader 0
ATR: 3B xx xx xx xx xx xx xx xx xx 90 00

DEBUG: Command  APDU: 00 A4 04 00 08 A0 00 00 00 03 00 00 00
DEBUG: Response APDU: 6F 10 84 08 A0 00 00 00 03 00 00 00 xx xx xx xx xx xx 90 0
0
Successfully selected Security Domain OP201a A0 00 00 00 03 00 00 00
DEBUG: Command  APDU: 80 50 00 00 08 81 E1 03 49 80 01 86 FC
DEBUG: Response APDU: 00 00 11 60 00 09 9A 5A 0A F9 FF 02 00 20 BA 9A 16 94 77 B
9 C6 B7 0D EF EC 38 1F 68 90 00
DEBUG: Command  APDU: 84 82 00 00 10 87 4A F3 C5 41 32 09 8F 44 EB 45 43 37 DC 5
6 91
DEBUG: Response APDU: 90 00
DEBUG: Command  APDU: 84 82 00 00 08 87 4A F3 C5 41 32 09 8F
DEBUG: Response APDU: 90 00
DEBUG: Command  APDU: 80 F2 80 00 02 4F 00
DEBUG: Response APDU: 08 A0 00 00 00 03 00 00 00 01 9E 90 00
DEBUG: Command  APDU: 80 F2 80 00 02 4F 00
DEBUG: Response APDU: 08 A0 00 00 00 03 00 00 00 01 9E 90 00
DEBUG: Command  APDU: 80 F2 40 00 02 4F 00
DEBUG: Response APDU: 06 xx xx xx xx xx xx xx 00 0E 63 61 6C 63 75 6C 61 74 6F 7
2 2E 61 70 70 07 00 xx xx xx xx xx xx xx xx xx 11 11 07 00 90 00
DEBUG: Command  APDU: 80 F2 40 00 02 4F 00
DEBUG: Response APDU: 06 xx xx xx xx xx xx xx xx xx xx 63 75 6C 61 74 6F 7
2 2E 61 70 70 07 xx xx xx xx xx xx xx xx xx 08 09 11 11 07 00 90 00
DEBUG: Command  APDU: 80 F2 10 00 02 4F 00
DEBUG: Response APDU: 6A 81
DEBUG: Command  APDU: 80 F2 10 00 02 4F 00
DEBUG: Response APDU: 6A 81
DEBUG: Command  APDU: 80 F2 20 00 02 4F 00
DEBUG: Response APDU: 07 A0 00 00 00 03 xx xx xx xx xx xx xx xx xx 03 10 01 00 0
5 31 50 41 59 2E 01 00 08 Dxx xx xx xx xx xx xx xx xx 00 08 D4 10 65 09 90 00 30
xx xx xx xx xx xx xx xx xx 00 05 D4 10 65 xx xx xx xx xx xx xx xx xx 00 04 10 01
 00 06 xx xx xx xx xx xx xx xx xx0 00 00 00 xx xx xx xx xx xx xx xx xx 55 0
1 00 xx xx xx xx xx xx xx xx xx 2E 70 xx xx xx xx xx xx xx xx xx 05 06
07 08 09 11 01 00 90 00
DEBUG: Command  APDU: 80 F2 20 00 02 4F 00
DEBUG: Response APDU: 07 A0 00 00 00 03 53 50 01 00 xx xx xx xx xx xx xx xx xx 0
5 31 50 41 59 2E 01 xx xx xx xx xx xx xx xx xx 08 D4 10 65 09 90 00 30
00 01 00 05 D4 10 xx xx xx xx xx xx xx xx xx 00 00 00 04 10 01
 00 06 xx xx xx xx xx xx xx xx xx 00 03 86 xx xx xx xx xx xx xx xx xx 0
1 00 xx xx xx xx xx xx xx xx xx 6B xx xx xx xx xx xx xx xx xx 06
07 08 09 11 01 00 90 00
AID: xx xx xx xx xx xx xx xx xx                       |........|        ISD LC: 1 P
R: 0x9E

AID: xx xx xx xx xx xx xx xx xx                             |."3DUf|          App LC: 7 P
R: 0x00

AID: 63 61 6C 63 75 6C 61 74 6F 72 2E 61 70 70     |calculator.app|  App LC: 7 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx              |...........|     App LC: 7 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx                          |.....SP|         Exe LC: 1 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx                            |......|          Exe LC: 1 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx                               |1PAY.|           Exe LC: 1 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx                       |..e.....|        Exe LC: 1 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx                       |..e...0.|        Exe LC: 1 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx                                |..e..|           Exe LC: 1 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx                                |..e.0|           Exe LC: 1 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx                             |......|          Exe LC: 1 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx                             |....3.|          Exe LC: 1 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx                          |.......|         Exe LC: 1 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx                               |."3DU|           Exe LC: 1 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx 70 61 63 6B  |calculator.pack| Exe LC: 1 P
R: 0x00

AID: xx xx xx xx xx xx xx xx xx 09 11                 |..........|      Exe LC: 1 P
R: 0x00

Note: AIDs disguised deliberately.

As you see above I put gpj folder in this address : E:\RCII Projects Data\Smart Card\SOFT\gpj

As I was wanted to have gpj as a command of cmd anywhere in command-line, I added its path to my PATH environment variables.

Now, when I try to list applets, I receive the below output.why?

D:\>gpj -list

D:\>java -jar gpj.jar -list
Error: Unable to access jarfile gpj.jar

D:\>

Why I receive Error? (Running as administrator checked already and didn't worked.)

Note that, It works fine in its directory yet.

0

I believe that what you want to do is modify\create the CLASSPATH environment variable. This works like PATH but for Java classes and jar files. BTW, the system only looks for EXE\COM\BAT files in PATH; it won't ever find a .jar file. Full description here: http://www3.ntu.edu.sg/home/ehchua/programming/howto/environment_variables.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.