This content has been marked as final. Show 4 replies
do you want to de-compile .cap file to get source code ?
Actually i want to get the byte code not the java code. in Java, if we have .class file we can use this command to get the java byte code : javap -c filename.class. but if it is a .cap file how can i do it ?
Edited by: 976006 on Dec 13, 2012 2:23 AM
.cap files are like jar file and they are not the .class files generated from .java files. You can use .class files to do the same thing as java card source code is first converted into .class files and then into .cap file.
read the javacard spec.1 person found this helpful
the cap file format is described. this is a jar file with "components".
the Method component contains the bytecode
the structure of this component is described in the spec
you can disassemble that into readable bytecode, because each bytecode is documented in the same spec.
if you're building the cap file yourself then it's easier to generate a JCA file along with the CAP, the jca file is a ".asm" file (that can be assembled into a CAP later).