Any tools to reverse a cap file?

Do any of you all know if there are tools (open source or commercial) that will reverse a cap file to a class file? Yeah, I know, without the export files there will be a loss of meaningful names for the packages, classes and methods, but it should still be possible (with some effort). I have not found one but thought that perhaps you all might know of one.
Lacking that, does any one know if there are any open source tools to display the contents of a cap file (jca like output). I have heard that some of the commercial toolkits (like GEM) have tools that can do this. But I don't have one and they are not open source. I figure if I'm going to write a tool to deconvert (or decap) a cap file, starting with an open source tool would make things quicker...
Ideally I would like to reverse a cap file all the way back to a Java source file and I'm guessing that if I can get a cap file back to a class file then a normal decompiler should do the rest.
Dan

Hi Dan,
After 3 years I want to ask you, did you get any such decompilers etc or not ?
I also want to convert the cap file to source code. If I can not do this, at least is there a way or tool that can parse the byte code for me.
A reply would be highly appreciated.
Thanks,
AQ

Similar Messages

  • Enquiry:  Any tool to reverse engineer an existing db schema in Oracle 8i

    Dear All,
    Do you know whether Oracle SQL Developer Data Modeler (3.1.1.703) supports Oracle 8i? If not, is there any tool that can be used to reverse engineer an existing database schema in Oracle 8i?
    Your early reply is appreciated.
    Thanks a lot.
    LAWRENCE CHOW

    That's a pity. The initial version of Data Modeler used to support import from Oracle 8i.
    You could try setting up an ODBC connection to your database and using the JDBC tab (rather than the Oracle tab) when entering the Connection details into Data Modeler.
    Alternatively, if you can get hold of an earlier version of Data Modeler (e.g. version 3.0 or earlier), you could try this (and if it works you could then upgrade your model to the current version).
    David

  • CAP file transmitter

    hi everyone
    other than jcop, is there any tool for sending a cap file to java card ?
    i can't get JCOP tools.

    hi
    GPShell 1.4.1 is excellent. i would like to give a special thank to aus .
    GPShell is open source, It is written on top of the GlobalPlatform library.
    http://sourceforge.net/projects/globalplatform/
    following cards are tested:
    Kona java card 20 (GP2.1.1,SCP02)
    Oberthur CosmopoliC 32K (OP201)
    CosmopoliC 64K V5.2 (GP211, SCP01, Impl05)
    Axalto Cyberflex e-gate 32k
    GemXpresso R3.2 E64
    IBM JCOP v2.2 41
    IBM JCOP 31 (36k)
    Nokia 6131 NFC Phone
    Axalto Cyberflex Access 64k
    for compiling and converting java card applets, use jcde and
    for loading cap file on the card, use GPShell.
    jcop tools need license,
    when open source projects are available and work properly , we don't need
    JCOP Tools.

  • CAP file safety  questions?

    Hello,
    I am interested in 3 question:
    1. Is there any possibility to get the CAP file from a card.
    2. Is CAP file backward convertible to .class or .java files? I.e. is it safe enough for distribution, to avoid the retrieval of the source code?
    3. What files should be distributed for extended APIs: EXP, CAP file and stub class files? Am i right?
    I appreciate any answers and advices regarding the safety of the CAP files.
    Best regards,
    newbie.

    1. Is there any possibility to get the CAP file from a card.Yes. Use google, search on "Javacard attacks" or "javacard hacks". You will find many papers and presentations on what has been done, what works, what does not.
    My conclusions: Its possible. Its hard to do. Various people are working on it, so perhaps its getting easier. Vendors are making cards more resistant to attack, so perhaps its getting harder.
    2. Is CAP file backward convertible to .class or .java files? No, not backward compatible, or at least not easily. Some information is lost. I have not found any open source or commercial tools for this.
    See this thread: http://forum.java.sun.com/thread.jspa?threadID=5217462&tstart=0
    I.e. is it safe enough for distribution, to avoid the retrieval of the source code?Probably. It will take significant effort to reverse a CAP file all the way back to Java source that will compile and execute with the same results as the original. Probably 100's of hours of work.
    3. What files should be distributed for extended APIs: EXP, CAP file and stub class files? Am i right?At minimum the EXP and CAP. A developer has no way to use the CAP file without the EXP file. The EXP file contains all of the class, method and field names for the public methods/fields that the converter tool needs (there are no String names in the CAP file).
    Read the JavaCard Virtual Machine specification. Its very enlightening.
    Dan

  • Cap file analyzer program?

    Hello all,
    Is there any program to analyze the cap file?
    the program read the cap file and print out or make a file with cap file information by components user kindly format. like Header Component.tag = 0x01 size=0x0A .....
    Thanks,
    Julie.

    hi:
    i write a program that can parse CAP file, hope that is helpful to you.
    http://www.akaembed.org/Inetpub/uploads/AKA_Mail/JavaCard/CAPParser/CAPParser.exe
    Good Lucky!

  • Is there any tool that can display the internal structure of a F4F file?

    Dear all,
    I want to view the internal structure of an f4f file, Is there any tool that I can use to do that?
    Thanks,
    Xuedong

    check the table AUFM (Goods movements for order)
    pass inputs to all the key fields.
    and another table AFPO
    try to use these tables.
    regards,
    sateesh.

  • Any tool to generate 1 million xml files?

    Hi All,
    I have customer file and want to generate 1 million xml files to start load performance testing.
    Let me know if any tool available.
    Thanks
    Shruthikaa

    Hi Shruthikaa,
    As suggested LoadGen tool can be used for testing stress and performance, also you can do it with visual studio -
    Load Testing using Visual Studio
    Maheshkumar S Tiwari|User Page|Blog|BizTalk
    Server : How Map Works on Port Level

  • Java card cap file install error in jcop tools

    When i try to run java card applet in real java card it gives this error.i used jcop tools and java version 1.5  and eclipse 3.2.when i run the applet in simulater it works fine.i saw some document it says allocate memory for the installation process.i don't know how to do that.
    /term "winscard:4|SCM Microsystems Inc. SCL010 Contactless Reader 0"
    --Opening terminal
    >  /card -a a000000003000000 -c com.ibm.jc.CardManager
    resetCard with timeout: 0 (ms)
    --Waiting for card...
    ATR=3B 8A 80 01 4A 43 4F 50 33 31 56 32 33 32 7A       ;...JCOP31V232z
    ATR: T=0, T=1, Hist="JCOP31V232"
    => 00 A4 04 00 08 A0 00 00 00 03 00 00 00 00          ..............
    (23807 usec)
    <= 6F 65 84 08 A0 00 00 00 03 00 00 00 A5 59 9F 65    oe...........Y.e
        01 FF 9F 6E 06 47 91 73 51 2E 00 73 4A 06 07 2A    ...n.G.sQ..sJ..*
        86 48 86 FC 6B 01 60 0C 06 0A 2A 86 48 86 FC 6B    .H..k.`...*.H..k
        02 02 01 01 63 09 06 07 2A 86 48 86 FC 6B 03 64    ....c...*.H..k.d
        0B 06 09 2A 86 48 86 FC 6B 04 02 15 65 0B 06 09    ...*.H..k...e...
        2B 85 10 86 48 64 02 01 03 66 0C 06 0A 2B 06 01    +...Hd...f...+..
        04 01 2A 02 6E 01 02 90 00                         ..*.n....
    Status: No Error
    cm>  set-key 255/1/DES-ECB/404142434445464748494a4b4c4d4e4f 255/2/DES-ECB/404142434445464748494a4b4c4d4e4f 255/3/DES-ECB/404142434445464748494a4b4c4d4e4f
    cm>  init-update 255
    => 80 50 00 00 08 AC B1 90 01 BF 2D 24 A0 00          .P........-$..
    (49906 usec)
    <= 00 00 91 18 01 39 93 95 05 59 FF 02 00 2C BE 39    .....9...Y...,.9
        5E A5 07 55 87 B8 C3 A8 A6 93 66 2B 90 00          ^..U......f+..
    Status: No Error
    cm>  ext-auth plain
    => 84 82 00 00 10 0C AE 50 3E C8 7E 1D 92 29 E2 59    .......P>.~..).Y
        08 D9 DA 02 16                                     .....
    (57276 usec)
    <= 90 00                                              ..
    Status: No Error
    cm>  delete 060504030201
    => 80 E4 00 00 08 4F 06 06 05 04 03 02 01 00          .....O........
    (40041 usec)
    <= 6A 88                                              j.
    Status: Reference data not found
    jcshell: Error code: 6a88 (Reference data not found)
    jcshell: Wrong response APDU: 6A88
    Ignoring expected error
    cm>  delete 010203040506
    => 80 E4 00 00 08 4F 06 01 02 03 04 05 06 00          .....O........
    (17392 usec)
    <= 6A 88                                              j.
    Status: Reference data not found
    jcshell: Error code: 6a88 (Reference data not found)
    jcshell: Wrong response APDU: 6A88
    Ignoring expected error
    cm>  upload -d -b 250 "Cap File location"
    => 80 E6 02 00 13 06 01 02 03 04 05 06 08 A0 00 00    ................
        00 03 00 00 00 00 00 00 00                         .........
    (32303 usec)
    <= 00 90 00                                           ...
    Status: No Error
    => 80 E8 00 00 FA C4 81 F2 01 00 23 DE CA FF ED 02    ..........#.....
        02 04 00 01 06 01 02 03 04 05 06 12 68 6D 73 2F    ............hms/
        6A 61 76 61 63 61 72 64 2F 68 65 6C 6C 6F 02 00    javacard/hello..
        21 00 23 00 21 00 0A 00 0B 00 1E 00 0E 00 3D 00    !.#.!.........=.
        0A 00 0B 00 00 00 4D 01 BE 00 00 00 00 00 00 01    ......M.........
        01 00 04 00 0B 01 02 01 07 A0 00 00 00 62 01 01    .............b..
        03 00 0A 01 06 06 05 04 03 02 01 00 08 06 00 0E    ................
        00 00 00 80 03 00 FF 00 07 01 00 00 00 1C 07 00    ................
        3D 00 01 10 18 8C 00 05 7A 05 30 8F 00 00 3D 8C    =.......z.0...=.
        00 01 18 1D 04 41 18 1D 25 8B 00 02 7A 02 21 18    .....A..%...z.!.
        8B 00 03 60 03 7A 19 8B 00 04 2D 1A 04 25 73 00    ...`.z....-..%s.
        09 00 00 00 00 00 0F 11 6D 00 8D 00 06 7A 08 00    ........m....z..
        0A 00 00 00 00 00 00 00 00 00 00 05 00 1E 00 07    ................
        01 00 02 00 06 00 00 01 03 80 03 02 03 80 03 03    ................
        03 80 0A 01 06 80 03 00 06 80 07 01 09 00 0B 00    ................
        00 00 07 05 06 04 0A 07 07 13 0B 00 4D 01 00 00    ............M...
    (764519 usec)
    <= 6A 80                                              j.
    Status: Wrong data
    jcshell: Error code: 6a80 (Wrong data)
    jcshell: Wrong response APDU: 6A80
    Unexpected error; aborting execution

    Thanks ReNa
    i am using nxp jcop 31 contact-less card.and it will support for java card 2.2.1 and global-platform card specification 2.1.1 .so i am using nxp jcop training 2007 tools and it has java card 2.2.1 and global-platform card specification 2.1.1.Inside my project there are three jar files these are jc221.jar and gp211.jar and bio10.jar
    i will appreciate your help
    Thanks

  • Http live streaming - any tools or API to parse the index files?

    Hi,
    I am working on a monitoring tool. The idea of this tool is to monitor the downloads of http live streaming segments. I want to know if there are any tools or API available to parse the master index files and the alternate indes files to get to the video segment files?
    Appreciate your help.
    Thanks,
    Pams.

    What I find so far:
    1. can get some process property values from ComponentInstance class, see its api.
    http://download.oracle.com/docs/cd/E14571_01/apirefs.1111/e10659/oracle/soa/management/facade/ComponentInstance.html
    Please refer http://blogs.oracle.com/soabpm/2009/07/soa_suite_11g_api_tricks_part.html of how to get the component instance (contain the bpel process) from a composite object
    2. in dev_soainfra database schema, the CUBE_INSTANCE table contains most of soa bpel components information. The BPM_CUBE_PROCESS table seems to contain only the process defined in a bpm application. This sounds a little confused, if we want to develop a bpel application, should it be put in soa or bpm application and what is the difference?
    Please feel free to correct any mistakes here.

  • How to load the .cap file in a Smart Card?

    Dear All,
    Hello..!!
    I am using JCDK 2.2 and have used Eclipse JCDK.
    I have written a simple read/write applet and created a .cap file using Eclipse's Converter Java Card tool.
    What is the next step to be done?
    I have a smart card device and have installed its drivers.
    When do the APDU commands come into picture?
    Expecting help.
    Thanks a lot.
    Regards,
    Suril

    Suril Sarvaiya wrote:
    Hi Shane....
    Thnx a lot....
    I have downloaded GP-Shell 1.4.4
    When I open its application and write any command and press enter ; the app window closes immendiately.
    Can you please help me on this?
    One more thing Shane......
    I'm writig a java class using javax.smartcardio
    I have installed drivers of Omnikey 3021
    but the TerminalFactory is not detecting it?
    Any idea on that?
    Thanks again...
    Regards,
    SurilHi all,
    Is Mr. thread starter has solved his problem?
    I profit this thread to post my question. I'm working with new environment and I have problem loading cap file into my smartcard.
    specification come first :-)
    - My smartcard is said to be JC2.2.1 and GP2.1.1 compatible
    - My code (for testing) is written in Java under eclipse Helios service 2 with JavaCard plugin (for JC2.2.2)
    I compile my code with JDK 1.3 (for compatible version) and using the JC plugin to generate cap file (along with exp and jca).
    My problem is exactly the same as one that was posted in this forum about 2 years ago but is not answered :-)
    [Problem Loading Application to Card |http://forums.oracle.com/forums/thread.jspa?threadID=1749334&tstart=420]
    + I successfully authenticate with smartcard
    + APDU command Install for Load is executed successfully
    + BUT the APDU command LOAD file fails with returned status word is 6424
    For details, I post here my javacard applet code and APDU command executed with my tool:
    package mksAuthSys;
    import javacard.framework.APDU;
    import javacard.framework.Applet;
    import javacard.framework.ISO7816;
    import javacard.framework.ISOException;
    import javacard.framework.OwnerPIN;
    public class Jcardlet extends Applet {
         private final static byte[] myPIN = { (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04};
         final static byte Jcardlet_CLA =(byte)0xB0;
         final static byte VERIFY = (byte) 0x20;
         final static byte PIN_TRY_LIMIT =(byte)0x03;
         final static byte MAX_PIN_SIZE =(byte)0x08;
         final static short SW_VERIFICATION_FAILED = 0x6300;
         OwnerPIN pin;
         private Jcardlet() {
              pin = new OwnerPIN(PIN_TRY_LIMIT, MAX_PIN_SIZE);
              pin.update(myPIN, (byte) 0, (byte) 4 );
             register();
         public static void install(byte bArray[], short bOffset, byte bLength)
                   throws ISOException {
              new Jcardlet().register();
         public boolean select() {
              if ( pin.getTriesRemaining() == 0 ) return false;
             return true;     
         public void deselect(){
              pin.reset();
         //@Override
         public void process(APDU apdu) throws ISOException {
              // TODO Auto-generated method stub
              byte[] buffer = apdu.getBuffer();
              if ((buffer[ISO7816.OFFSET_CLA] == 0) &&
                      (buffer[ISO7816.OFFSET_INS] == (byte)(0xA4))) return;          
              if (buffer[ISO7816.OFFSET_CLA] != Jcardlet_CLA)
                    ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);          
              switch (buffer[ISO7816.OFFSET_INS]) {
               case VERIFY: verify(apdu);
                 return;
               default: ISOException.throwIt (ISO7816.SW_INS_NOT_SUPPORTED);
         private void verify(APDU apdu) {
              // TODO Auto-generated method stub
             byte[] buffer = apdu.getBuffer();
             // retrieve the PIN data for validation.
             byte byteRead = (byte)(apdu.setIncomingAndReceive());
             // check pin
             // the PIN data is read into the APDU buffer
             // at the offset ISO7816.OFFSET_CDATA
             // the PIN data length = byteRead
             if ( pin.check(buffer, ISO7816.OFFSET_CDATA,byteRead) == false )
               ISOException.throwIt(SW_VERIFICATION_FAILED);          
    }And my APDU command:
    Loading "D:\mksAuthSys.cap" ...
    T - 80F28000024F00
    C - 08A000000003000000079E9000
    ISD AID : A000000003000000
    T - 80E602001508F23412345610000008A00000000300000000000000
    C - 009000
    T - 80E80000C8C482018B010012DECAFFED010204000108F23412345610000002001F0012001F000C001500420012009D0011001C0000009F00020001000402010004001502030107A0000000620101000107A000000062000103000C0108F234123456100001002306001200800301000104040000003DFFFF0030004507009D000510188C0003188F00013D0610088C00028700AD007B000403078B0005188B00067A02308F00073D8C00088B00067A0110AD008B00096104037804780110AD008B000A7A0221198B000B2D1A0300
    C - 6424
    Stopped loading due to unexpected status words.Urgently look forward to hearing from you.
    Thanks a bunch in advance
    Best Regards,
    JDL

  • Converting CAP file to JCA using normalizer

    Hi, I'm trying to generate 2.2.1(or 2.2.2) JCA file from 2.2.1(or 2.2.2) CAP file using JCDK 3.0 normalizer. I generated class files successfully but when using converter from javacard-kit 2.2.2 i get following error messages
    unsupported class file format of version 50.0.
    Is there any way to solve the error? I also like to know if there exists any other tool other than normalizer to convert cap file to jca file,

    javac -g -source 1.2 -target 1.2 -classpath $JC_HOME/lib/api.jar:$JC_HOME/lib/installer.jar src/xu/test/*.java -d binYou can have a look at the man file for javac in the section source/target and try the different options. I'm using sun-java6-jdk with these compiler parameters and have no problem when it comes to converting the files.
    Hope this can help you.
    Cheers

  • Eclipse-jcop project building { create .cap file } problem??????????????

    hello all,
    I am using jcop tool plugin with eclipse and my atr is:-
    --Opening terminal
    /card -a a000000003000000 -c com.ibm.jc.CardManager--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.everything is fine with sample applet { it contain a empty process () or gives 90 00 for select applet apdu }
    I am using eclipse ide and jcop plugin, basically my problem is to building project when any changes occoured, initially when i start a new project with steps like:-
    1- java card project
    2-java applet
    3-package id
    4-applet id
    5-basic template of applet
    N- finish
    ok
    then when screen open, at the left side i saw cap file propery window ,and automatically there are cap file in bin folder.
    It means jcop tool used converter to make .cap file, but when i add some lines according to my requirment,
    I am unable to build it again or unable to get a new cap file. May be i need to set some build path , but first time it automatically build so it also indicate that there are no need to set the build path. I am confused in this area.
    Is i need to reference the path of converter.jar { jcdk 2.2.1 }? or jcop plugin also have the required jar for converting .class to .cap , inside it. how i rebuild it and make a new fresh .cap file.
    some jar file which i paste in plugin folder of eclipse are:-
    com.ibm.bluez.jcop.eclipse.demopack_1.0.2.jar
    com.ibm.bluez.jcop.eclipse.perftest_1.0.2.jar
    com.ibm.bluez.jcop.eclipse.signlite_1.0.2.jar
    com.ibm.bluez.jcop.eclipse.targetpack.gemplus_1.0.0.jar
    com.ibm.bluez.jcop.eclipse.targetpack_1.0.3.3.jar
    com.ibm.bluez.jcop.eclipse_1.0.3.3.jar
    com.ibm.bluez.jcop.eclipse_3.1.1.a.jarbefore i was using JCDE plugin for simulation process but here i did not use JCDE, I have only eclipse + jcop plugin
    I tried to tell you, what is my problem, If you still have any doubt , Let me know.
    Waiting for your reply and thanks for your time ............

    Thanks Umer for your suggestion , but i dont need to do this, It was my silly mistake to handle the things properly.
    Initially i was unable to getting the eclipse and JCOP concept, but now i do. now I am able to build the project or eclipse is building it automatically !!!! I faced this problem b'se i am a newbie in java card. but now things going good to me.
    I want to share my getting here:--
    My dout was - Is jcop intially have all the Jar's , converter which is required to create a cap file????
    My ans is - Yes, EVERYTHING IT HAVE INSIDE.
    you just get eclipse ide and get jcop plugin, and paste jcop plugin jar's inside the plugin folder of ecipse and START ECLIPS AGAIN.
    NOW EVERYTHING IS SET FOR YOU,
    NO REQUIREMENT OF JCDE-java card development envoirnment
    no requirement of jcdk- java card development kit ,
    no requirement of set any build path in eclipse. just make your applet , and run with jcop tool.ECIPSE AUTOMATICALLY BUILD OPTION WILL CREATE A FRESH .CAP FILE WHENEVER U MADE A NEW CHANGES
    cheers!!!

  • IDES for writing Java card applets and converting the applets as CAP FILE.

    I have developed a JAVA CARD APPLET , FindMFValueJCA.java . It gets compiles in net beans 6.0 But while converting the applet to CAP file i am getting some errors. Is there any other IDES which take care of converting the CAP files

    What's the Java version you are using?
    As the java card tool kit has version dependencies. If you are using java_card _kit 2.2.2 then 1.5 is fine.                                                                                                                                                                                                                                                                                                   

  • CAP file generating ERROR

    Hi everybody ,
    I'm trying to build a javacard project by using ANT tool . The problem is when i use the JCOP tool converter (tric.jar) with JRE 1.4 or 1.5 i got the following error :
    Error: class java.lang.RuntimeException, resolving constant-pool of clazz Lhun/eid/javacard/EIDApplet; failed: no such method getClass, ()Ljava/lang/Class; in Ljava/lang/Object;
    and JCOP tool converter with JRE 1.6 , igot another error : invalid magic cafebabe
    After that , i replaced the JCOP tool's converter by using the java_card_kit-2_2_2's converter , and i got another error :
    [java] converting hun.eid.javacard.EIDApplet
    [java] parsing C:\Users\mannykitty\workspace NEW\HUNEID\lib\api_export_files\javacard\framework\javacard\framework.exp
    [java] parsing C:\Users\mannykitty\workspace NEW\HUNEID\lib\api_export_files\javacardx\crypto\javacard\crypto.exp
    [java] error: line 2094: hun.eid.javacard.EIDApplet: method getClass() of class java.lang.Object not found in export file lang.exp or the method signature has changed.
    [java] error: line 2094: hun.eid.javacard.EIDApplet: class java.lang.Class not found in export file lang.exp.
    [java] error: line 2094: hun.eid.javacard.EIDApplet: class java.lang.Class in return type of method java.lang.Object.getClass() not found.
    [java] error: line 2094: hun.eid.javacard.EIDApplet: method getClass() of class java.lang.Object not found in export file lang.exp or the method signature has changed.
    [java] error: line 2094: hun.eid.javacard.EIDApplet: class java.lang.Class not found in export file lang.exp.
    [java] error: line 2094: hun.eid.javacard.EIDApplet: class java.lang.Class in return type of method java.lang.Object.getClass() not found.
    [java] conversion completed with 6 errors and 0 warnings.
    [java] Java Result: 1
    Can someone tell me how to fix this ? Any help will be appreciated !

    I've added the api.jar to class path for compiling but it's seemed not to be changed . Here is my ANT build.xml config :
    <property name="lib" value="lib"/>
         <property name="JCKlibHome" value="c:\Java\java_card_kit-2_2_2\lib"/>
    <property name="JCOPlib" value="${lib}/slbJIop.jar;${lib}/jc_api_212.jar;${lib}/jce1_2_2.jar;${lib}/sunjce_provider.jar"/>
    <property name="JCOPtools" value="${JCKlibHome}/converter.jar;${JCKlibHome}/offcardverifier.jar"/>
    <property name="src" value="src"/>
         <property name="build" value="build"/>
    <property name="classes" value="${build}/classes"/>
    <property name="cardout" value="${build}/card"/>
    <property name="tmp" value="${build}/tmp"/>
    <property name="buildcp" value="${JCOPlib};${JCKlibHome}/api.jar"/>
    Compile :
    <target name="compile" depends="init" description="Compile the javacard source into class files">
    <!-- Compile the java code from ${src} into ${classes} -->
    <javac debug="yes" classpath="${buildcp}" srcdir="${src}" destdir="${classes}"/>
    </target>
    CAP generation:
    <target name="createCAP" depends="compile,capuptodatecheck" unless="capfile.uptodate" description="Create the CAP file from the class files">
    <java classname="com.sun.javacard.converter.Converter" classpath="${JCOPtools}" fork="yes">
         <arg line="-classdir ${classes}" />
         <arg line="-exportpath ${JCOPlib};C:\Java\java_card_kit-2_2_2\api_export_files"/>
         <arg line="-d ${cardout}" />
         <arg line="-v" />
         <arg line="-out CAP EXP JCA" />
         <arg line="-applet 0x41:0x70:0x70:0x68:0x75:0x6e:0x65:0x69:0x64 hun.eid.javacard.EIDApplet hun.eid.javacard 0x41:0x70:0x70:0x68:0x75:0x6e:0x65:0x69:0x64:0x01" />
         <arg line="1.0" />
    ERROR :
    [java] error: line 2094: hun.eid.javacard.EIDApplet: method getClass() of class java.lang.Object not found in export file lang.exp or the method signature has changed.
    [java] error: line 2094: hun.eid.javacard.EIDApplet: class java.lang.Class not found in export file lang.exp.
    [java] error: line 2094: hun.eid.javacard.EIDApplet: class java.lang.Class in return type of method java.lang.Object.getClass() not found.
    [java] error: line 2094: hun.eid.javacard.EIDApplet: method getClass() of class java.lang.Object not found in export file lang.exp or the method signature has changed.
    [java] error: line 2094: hun.eid.javacard.EIDApplet: class java.lang.Class not found in export file lang.exp.
    [java] error: line 2094: hun.eid.javacard.EIDApplet: class java.lang.Class in return type of method java.lang.Object.getClass() not found.
    [java] conversion completed with 6 errors and 0 warnings.
    [java] Java Result: 1
    :(

  • JavaCard .cap file generation throws IllegalArgumentException

    Hi all,
    I'm trying to generate a .cap file for some applet source provided externally, and capgen/converter are throwing an IllegalArgumentException when I attempt to generate a .cap (either straight from .opt or using capgen on a pre-generated .jca file). I'm able to generate/run the .cap file from JCOP tools for eclipse, so I'm able to verify it's authenticity.
    The output I'm getting is pretty basic even in verbose mode:
    C:\projects\MWallet\src>converter -config .\com\schip_select\schip.opt
    Java Card 2.2.1 Class File Converter, Version 1.3
    Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    parsing C:\projects\MWallet\src\com\mycard\schip_select\Constants.class
    parsing C:\projects\MWallet\src\com\mycard\schip_select\schip.class
    parsing C:\projects\MWallet\src\com\mycard\schip_select\schip_pin.class
    parsing C:\projects\MWallet\src\com\mycard\schip_select\protected_array.class
    converting com.mycard.schip_select.Constants
    converting com.mycard.schip_select.schip
    parsing C:\JavaCardDevelopment\api_export_files\javacard\framework\javacard\framework.exp
    parsing C:\JavaCardDevelopment\api_export_files\java\lang\javacard\lang.exp
    parsing C:\gp211\org\globalplatform\javacard\globalplatform.exp
    parsing C:\JavaCardDevelopment\api_export_files\javacard\security\javacard\security.exp
    converting com.mycard.schip_select.schip_pin
    converting com.mycard.schip_select.protected_array
    parsing C:\JavaCardDevelopment\api_export_files\javacardx\crypto\javacard\crypto.exp
    writing C:\projects\MWallet\src\com\mycard\schip_select\javacard\schip_select.jca
    java.lang.IllegalArgumentException
    Cap file generation failed.
    conversion completed with 1 errors and 0 warnings.
    The opt file I've got should be fairly un-offensive:
    -out CAP
    -exportpath "c:\JavaCardDevelopment\api_export_files;C:\gp211;.\"
    -debug
    -i
    -v
    -noverify
    -applet 0xA0:0x00:0x00:0x00:0x04:0x10:0x10 com.schip_select.schip
    com.schip_select
    0xA0:0x00:0x00:0x00:0x04:0x10 1.0
    I've tried with or without the -noverify flag.
    I'm using Java JDK Standard Edition (build 1.4.1_07-b02) to run the converter, and compile the source files. And I've tried the converter in the Sun Java Card Development kit 2.2.1 and 2.2.2. I've also tried attaching the jdb.exe to converter to see whats going on, I can see that it fails in a function:
    com.sun.javacard.jcasm.cap.ReferenceLocationComponent.addTwoByteOffset()
    But can't get anymore information than that. Any pointers to what could be causing this (I frankly don't know where to start) would be greatly appreciated.
    Thanks,
    James

    6A80 is the error which says that there is mismatch between jc version of card and java version.
    For Javacard 2.2.1 java version is jdk.1.4.1
    But lets not focus on that
    I tried to recreate the problem. You were using GP classes to create a cap file so I downloaded GP exp files from
    [http://www.globalplatform.org/specificationform2.asp|http://www.globalplatform.org/specificationform2.asp].
    Compiled files as
    javac -g -classpath .\classes;..\lib\api.jar;..\lib\installer.jar;libs/gp211.jar;libs/jc221.jar {PACKAGE_DIR}\*.javaMy opt file is as
    -out EXP JCA CAP
    -exportpath C:\java_card2.2.1\java_card_kit-2_2_1\api_export_files;C:\GP211\GP_exportA00000015100
    -applet <APPLET_AID> <Applet_DIR>
    <PACKAGE>
    <PACKAGE_AID> 1.0and called converter command as
    converter -config {PATH_TO_EXPORT_FILE}\HelloWorld.optI was able to create the CAP file successfully.

Maybe you are looking for

  • ATV 3rd gen won't output 1080

    My plasma supports 1080p @ 24fps or 1080i@50/60- my 2 Bluray players appear and HD sat box all appear as 1080 sources.  (The panel itself is an older 768x768 but as I said still accepts a 1080 signal) But ATV only appears as a 750p source, and I'm gu

  • IPod Classic fails to sync after adding new music

    Hi, so lately I've been having problems with my 160GB classic, I've always had problems with it but its gotten to the point where I am frustrated beyond belief. SO the problem arises when I add new music, it comes up with the error 'XXXX's iPod canno

  • Asset Under Construction Settlement

    Hi , Asset under Construction  Settelement  is it a month end activity ? If it is a month end activity what are the reasons? If it is not month end  activity  , why? if Settlement is posible in between the period what are all the  effects in sap? Ple

  • Duplication of invoice- please help

    frnds i posted one invoice with invoice date 04/18/2007, reference 2900 and cocode xx80 vendor 123909 i tried to post another inovoice with the same informaiton except invoice date which is 04/18/2007, it allowed me to post, shouldnt it stop me to po

  • After Int Install OS10.5.8 on PowerPC G4 having major system problems (created user to verify) CS4 apps go non responsive

    After Int Install OS10.5.8 on PowerPC G4 having major system problems (created user to verify) CS4 apps go non responsive