2 Replies Latest reply: Mar 14, 2012 10:55 AM by 923272 RSS

    Ant tools: converter java card

    923272
      Hi,

      I have already a problem with the ant tools for java card.
      I build a build.xml file which has for aim to generate the CAP,EXP, JCA and the *.script files before downloading them on cref.
      I have a problem with the command converter. Here you can find my code:
      <!--generation of the JCA,EXP and CAP file-->
                <echo message = "Generation of the CAP,JCA and EXP files..."     />
                <convert
                     JCA="true"
                     EXP="true"
                     CAP="true"
                     packagename="versionZero"
                     packageaid="0xB0:0x02:0x03:0x04:0x05:0x06:0x07:0x08:0x09:0x00"
                     majorminorversion="1.0"
                     verbose = "true">               
                     <AppletNameAID
                          appletname="versionZero.VersionZero"
                          aid="0xB0:0x02:0x03:0x04:0x05:0x06:0x07:0x08:0x09:0x00:0x00"/>
                     <classpath refid="classpath"/>
                </convert>


           My problem is the following: the command converter say mys package is empty and it is not the case: it contains all the *.java file.
      Must I compile the files with javac before using the convert command or it is another problem?


      Here is the trace of my build.xml file:
      Buildfile: /home/ehoudart/app-manager/VersionZero/src/build.xml
      testinit:
      [echo] Deleting the old generated files...
      [echo] Generation of the CAP,JCA and EXP files...
      [convert] Java Card Ant Tasks, Version 1.0
      [convert] Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
      [convert] Note: Usage of Java Card Ant Tasks is optional. Java Card Ant Tasks are not supported by Sun Microsystems, Inc.
      [convert] Java Card 2.2.2 Class File Converter, Version 1.3
      [convert] Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
      [convert] error: versionZero: empty package.
      [convert] conversion completed with 1 errors and 0 warnings.

      BUILD FAILED
      /home/ehoudart/app-manager/VersionZero/src/build.xml:115: Conversion failed

      Total time: 384 milliseconds


      Thanks in advance for your answer.
        • 1. Re: Ant tools: converter java card
          safarmer
          Hi,

          Please use &#123;code} tags for posting code etc.
          <!--generation of the JCA,EXP and CAP file-->
                    <echo message = "Generation of the CAP,JCA and EXP files..."     />
                    <convert
                         JCA="true"
                         EXP="true"
                         CAP="true"
                         packagename="versionZero"
                         packageaid="0xB0:0x02:0x03:0x04:0x05:0x06:0x07:0x08:0x09:0x00"
                         majorminorversion="1.0"
                         verbose = "true">               
                         <AppletNameAID
                              appletname="versionZero.VersionZero"
                              aid="0xB0:0x02:0x03:0x04:0x05:0x06:0x07:0x08:0x09:0x00:0x00"/>
                         <classpath refid="classpath"/>
                    </convert>
               My problem is the following: the command converter say mys package is empty and it is not the case: it contains all the *.java file.
          Must I compile the files with javac before using the convert command or it is another problem?
          That is correct. You can make your convert task depend on a compile task for this.

          Cheers,
          Shane
          • 2. Re: Ant tools: converter java card
            923272
            Hello; than you very much for your answer.
            It was well a problem of compiling the java files before converter. converter needs the class files.