Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

A newbie question

2895181Mar 2 2015 — edited Mar 2 2015

I am attempting to teach myself java using tutorials, etc.  fyi: I'm a retired mainframe developer (assembler language) and have proficiency in C++ as well. So while I'm just beginning with java I do have experience.  Her's my problem:  I downloaded and installed the current version of java: jdk 1.8.0_31.  The instructions I am working from say to test the install be asking for the current java version number by submitting "java -version" on the command line and that works just fine, it accurately reports the version.   The next instruction was to check the version number of the compiler by submitting "javac -version" and that does not work, my system tells me javac is not recognized as an internal or external command, operable program or bach file.   And yes, I did add:  "C:\Program Files\Java\jdk1.8.0_31\bin\;" to the end of the path environment.  I can also physically "see" the javac executable in the C:\Program Files\Java\jdk1.8.0_31\bin file.  So I'm obviously doing something wrong but it isn't obvious (to me, anyway).  Suggestions?  Thanks - Mike

Comments

843851
GPShell is raising the level of security on INSTALL [for install & make selectable] from AUTHENTICATED to C_MAC. That's why it fails. Repeat this command with CLA=0x80, without C_MAC (last 8 bytes) and adjusted Lc or negotiate C_MAC from the beginning (then all commands need C_MAC).
843851
Hello,
Thank you very much for your answer. But i think i'm a bit lost :) What do you mean by "negociate C_MAC from the beginning" ? In the script, the command "open_sc -security 3" should open a secured channel with the MAC level, shouldn't it ? I suppose i missed something but i can't see where. I tried to put "0" (no security) but the same mistake occured.
If you have any idea of how to negociate C_MAC on GPShell, i'd be verry happy.
Thank you again
Sébastien
843851
I tried what you told me, same error message.
Here's what i did :
mode_211
enable_trace
establish_context
card_connect
* reader name OMNIKEY CardMan 5x21 0
select -AID a000000003000000
Command --> 00A4040008A000000003000000
Wrapped command --> 00A4040008A000000003000000
Response <-- 6F108408A000000003000000A5049F6501FF9000
open_sc -security 0 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4
f -enc_key 404142434445464748494a4b4c4d4e4f 
Command --> 80CA006600
Wrapped command --> 80CA006600
Response <-- 664C734A06072A864886FC6B01600C060A2A864886FC6B02020101630906072A864
886FC6B03640B06092A864886FC6B040215650B06092B8510864864020103660C060A2B060104012
A026E01029000
Command --> 80500000082840E6A249C830C300
Wrapped command --> 80500000082840E6A249C830C300
Response <-- 00007115001731911702FF020030F1B3BA0D7FB70B04F4958A2C2D0F9000
Command --> 84820000106786E1AEFFFFDB6A8628DFF0936ED94B
Wrapped command --> 84820000106786E1AEFFFFDB6A8628DFF0936ED94B
Response <-- 9000
delete -AID a00000006203010c01
Command --> 80E400800B4F09A00000006203010C0100
Wrapped command --> 80E400800B4F09A00000006203010C0100
Response <-- 009000
delete -AID a00000006203010c0101
Command --> 80E400800C4F0AA00000006203010C010100
Wrapped command --> 80E400800C4F0AA00000006203010C010100
Response <-- 6A88
delete_applet() returns 0x80206A88 (6A88: Referenced data not found.)
install_for_load -pkgAID a00000006203010c01 -nvCodeLimit 500  -sdAID A0000000030
00000
Command --> 80E602001C09A00000006203010C0108A0000000030000000006EF04C60202000000

Wrapped command --> 80E602001C09A00000006203010C0108A0000000030000000006EF04C602
02000000
Response <-- 009000
load -file HelloWorld.cap
file name HelloWorld.cap
Command --> 80E80000EFC482019B010013DECAFFED010204000109A00000006203010C0102001F
0013001F000E000B0036000C0067000A00130000006C00000000000001010004000B01000107A000
000062010103000E010AA00000006203010C0101001406000C00800301000107010000001F070067
000210188C000118110100900B8700188B00027A02308F00033D8C00043B7A0523198B00052D198B
00063203290470191A08AD0016041F8D000B3B16041F41290419088B000C321F64E8198B00073B19
160408418B00081903088B000919AD000316048B000A7A08000A0000000000000000000005003600
0D020000000680030003
Wrapped command --> 80E80000EFC482019B010013DECAFFED010204000109A00000006203010C
0102001F0013001F000E000B0036000C0067000A00130000006C00000000000001010004000B0100
0107A000000062010103000E010AA00000006203010C0101001406000C0080030100010701000000
1F070067000210188C000118110100900B8700188B00027A02308F00033D8C00043B7A0523198B00
052D198B00063203290470191A08AD0016041F8D000B3B16041F41290419088B000C321F64E8198B
00073B19160408418B00081903088B000919AD000316048B000A7A08000A00000000000000000000
050036000D020000000680030003
Response <-- 009000
Command --> 80E88001B0800301010000000600000103800A0103800A0603800A0703800A090380
0A0403800A050680100203800A0309001300030E252C000C050C06040805100C080906090B006C01
0001000000000100030002000000001C00840001001E001100000000010900140030000900000000
0701001F0033004600000000000D001C001E001EFFFF001E001C00200020002200240027002A002E
01B001100140024103441004B44106B4B444024404B431066800A100
Wrapped command --> 80E88001B0800301010000000600000103800A0103800A0603800A070380
0A0903800A0403800A050680100203800A0309001300030E252C000C050C06040805100C08090609
0B006C010001000000000100030002000000001C00840001001E0011000000000109001400300009
000000000701001F0033004600000000000D001C001E001EFFFF001E001C00200020002200240027
002A002E01B001100140024103441004B44106B4B444024404B431066800A100
Response <-- 009000
send_apdu -sc 0 -APDU 80E60C002D09A00000006203010C010AA00000006203010C01010AA000
00006203010C0101010209C90100EF04C80207D00000
Command --> 80E60C002D09A00000006203010C010AA00000006203010C01010AA0000000620301
0C0101010209C90100EF04C80207D00000
Wrapped command --> 80E60C002D09A00000006203010C010AA00000006203010C01010AA00000
006203010C0101010209C90100EF04C80207D00000
Response <-- 6E00
send_APDU() returns 0x80206E00 (6E00: Wrong CLA byte.)
Tell me if you have any idea of where it could be.
Thank you again
Sébastien
843851
Forget my last post. It was nonsense.

I replicated your APDUs in the JCShell using JCOP 31/72 v2.2 and found no problems (see log below). Can you issue an /identify command to determine if it is a JCOP card and what version you're using?
- /term SCComm:1
--Opening terminal
<div class="jive-quote">/card</div>
resetCard with timeout: 0 (ms)
--Waiting for card...
ATR=3B E9 00 00 81 31 FE 45 4A 43 4F 50 34 31 56 32    ;....1.EJCOP41V2
    32 A7                                              2.
ATR: T=1, N=0, IFSC=254, BWI=4/CWI=5, Hist="JCOP41V22"
 => 00 A4 04 00 09 A0 00 00 01 67 41 30 00 FF          .........gA0..
 (86100 usec)
 <= 12 04 01 24 00 00 00 00 50 48 35 32 32 44 00 03    ...$....PH522D..
    D8 8D 93 6A 82                                     ...j.
Status: File not found
 => 00 A4 04 00 07 A0 00 00 00 03 00 00 00             .............
 (44603 usec)
 <= 6F 10 84 08 A0 00 00 00 03 00 00 00 A5 04 9F 65    o..............e
    01 FF 90 00                                        ....
Status: No Error
cm> auth
 => 80 50 00 00 08 65 BD 6E DD F6 10 79 D6 00          .P...e.n...y..
 (84584 usec)
 <= 00 00 52 08 00 21 10 90 77 28 FF 02 00 03 AD 66    ..R..!..w(.....f
    9A 47 9C 52 D5 1E 75 28 22 10 D9 CE 90 00          .G.R..u(".....
Status: No Error
 => 84 82 00 00 10 44 0D BF 28 C3 2E CC F7 7E B6 9C    .....D..(....~..
    38 D8 EF CB 6F                                     8...o
 (70185 usec)
 <= 90 00                                              ..
Status: No Error
cm> /identify
 => 00 A4 04 00 09 A0 00 00 01 67 41 30 00 FF          .........gA0..
 (64564 usec)
 <= 12 04 01 24 00 00 00 00 50 48 35 32 32 44 01 03    ...$....PH522D..
    D8 8D 93 6A 82                                     ...j.
Status: File not found
FABKEY ID:   0x12
PATCH ID:    0x04
TARGET ID:   0x01 (smartmx)
MASK ID:     0x24 (36)
CUSTOM MASK: 00000000
MASK NAME:   PH522D
FUSE STATE:  fused
ROM INFO:    D88D93
COMBO NAME:  smartmx-m24.12.04-PH522D
cm> /send 80E602001C09A00000006203010C0108A0000000030000000006EF04C60202000000
 => 80 E6 02 00 1C 09 A0 00 00 00 62 03 01 0C 01 08    ..........b.....
    A0 00 00 00 03 00 00 00 00 06 EF 04 C6 02 02 00    ................
    00 00                                              ..
 (54337 usec)
 <= 00 90 00                                           ...
Status: No Error
cm> /send 80E80000EFC482019B010013DECAFFED010204000109A00000006203010C0102001F00
13001F000E000B0036000C0067000A00130000006C00000000000001010004000B01000107A00000
0062010103000E010AA00000006203010C0101001406000C00800301000107010000001F07006700
0210188C000118110100900B8700188B00027A02308F00033D8C00043B7A0523198B00052D198B00
063203290470191A08AD0016041F8D000B3B16041F41290419088B000C321F64E8198B00073B1916
0408418B00081903088B000919AD000316048B000A7A08000A00000000000000000000050036000D
020000000680030003
 => 80 E8 00 00 EF C4 82 01 ..                                      ....
 (369213 usec)
 <= 00 90 00                                           ...
Status: No Error
cm> /send 80E88001B0800301010000000600000103800A0103800A0603800A0703800A0903800A
0403800A050680100203800A0309001300030E252C000C050C06040805100C080906090B006C0100
01000000000100030002000000001C00840001001E00110000000001090014003000090000000007
01001F0033004600000000000D001C001E001EFFFF001E001C00200020002200240027002A002E01
B001100140024103441004B44106B4B444024404B431066800A100
 => 80 E8 80 01 B0 80 03 01 01 ..
 (802605 usec)
 <= 00 90 00                                           ...
Status: No Error
cm> /send 80E60C002D09A00000006203010C010AA00000006203010C01010AA00000006203010C
0101010209C90100EF04C80207D00000
 => 80 E6 0C 00 2D 09 A0 00 00 00 62 03 01 0C 01 0A    ....-.....b.....
    A0 00 00 00 62 03 01 0C 01 01 0A A0 00 00 00 62    ....b..........b
    03 01 0C 01 01 01 02 09 C9 01 00 EF 04 C8 02 07    ................
    D0 00 00                                           ...
 (138481 usec)
 <= 90 00                                              ..
Status: No Error
cm> ls
 => 80 F2 80 00 02 4F 00 00                            .....O..
 (34261 usec)
..
 
Card Manager AID   :  A000000003000000
Card Manager state :  OP_READY
 
    Application:  SELECTABLE (------P-) A00000006203010C0101
    Load File  :      LOADED (--------) A0000000035350   (Security Domain)
     Module    :                        A000000003535041
    Load File  :      LOADED (--------) A00000006203010C01
     Module    :                        A00000006203010C0101
cm>{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
843851
Hello !
Actually, i was looking for JCOP Tools (i suppose that's where the "JCShell" comes from) but i didn't find it anywhere. So i'm trying to do everything with GPShell but it doesn't work for the moment.
If you know a way to get JCOP Tools, i'd be very happy :)
Just a silly question : your log indicates that your card is a "EJCOP41V2", is it normal ?
I'll send you the ATR of my card, maybe it can help us...
Thank you again for your help !
Sébastien
843851
If you look carefully, the historical characters are "JCOP41v22".

Can you just send the following identify APDU to the card?
00 A4 04 00 09 A0 00 00 01 67 41 30 00 FF
and paste the response?
843851
I'll try it tonight and i'll let you know.
I was a bit surprised to see a "JCOP41" answer from a "JCOP31" card actually, that's why i asked you.
Thank you again for your help
Sébastien
843851
Hello again,
This is the answer :
Command --> 00A4040009A000000167413000FF
Wrapped command --> 00A4040009A000000167413000FF
Response <-- 30040124000000005048353232440003D88D936A82
send_APDU() returns 0x80206A82 (6A82: File not found.)
Thank you again
Sébastien
843851
If it can help you, the ATR answer is :

3B 69 00 FF 4A 43 4F 50 33 31 56 32 32
which is "JCOP 31 v22 72K - S/C I/F"

and i tried the RFID ATR :
3B 89 80 01 4A 43 4F 50 33 31 56 32 32 4A
which is "JCOP 31 v22 72K (with Mifare 1K emulation) - RFID I/F"

Sébastien
843851
Honestly, no clue. It works on my side (also tried it with JCOP 31/72 v2.2). The only reason I can think of for SW_CLA_NOT_SUPPORTED at INSTALL[for install&make selectable] is due to wrong security level. But your log doesn't show that (unless GPShell sends something different).

As you seem to have an unfused card, try booting it and repeat the pre-personalization. If you don't know how, contact your distributor to do so or write NXP customer support.
843851
Ok, i'll email NXP and i'll see what they think about it :) Thank you very much again for the time you spent to help me, i really appreciate it.
Take care,
Sébastien
843851
NXP didn't answer to my message yet but somebody found something about my cards : they could be unfused. I asked the website where i bought them, i'm waiting for their answer. But maybe it's a good reason to explain my problems...
I ordered some other cards on another site, i suppose it will work this time !
Sébastien
843851
Fused or unfused, doesn't make a difference. There is something seriously wrong with your card or GPShell/Reader is not sending what it shows.
843851
Hi,

I'm facing the same problem.. Did u find any solution?

Thanks !
843851
Hello,
The only way i found to fix it is to use JCOP Tools (hard to find though). I suppose there is a bug in GPShell but i'm not totally sure !
Sébastien
843851
Is there an official and "deterministic" method of getting JCOP Tools?
Please if you have any idea inform me.

Thanks,
Amjad
843851
It shouldn't work like this. If you think there is a problem in GPShell, contact the author and work on a solution.

JCOP Tools from NXP can only be obtained through an NXP sales contact. NDA needs to be signed.
1 - 17
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 30 2015
Added on Mar 2 2015
0 comments
667 views