Reputation: 131
i have java card which supports some proprietary classes, say "ClassFoo" in package "packagename.foo". I have documentation for these classes and "foo.exp" file. But as i undestand it is neccessary something else to build cap file because without it compiler finds errors like uknown import package and unknown class. Right? What is it?
Upvotes: 3
Views: 564
Reputation: 94038
The .exp
file is used by the offcard Java Card converter. The converter converts standard Java classes to the .cap
files which can be uploaded to the Java Card implementation (usually through Global Platform).
To generate these class files you first need to compile the classes. For this the usual Java linker needs to link against the interface of the external classes. So vlp is correct that you need .class
files to compile against. Usually those classes are packaged into a .jar
file.
Now the actual implementation of these classes usually only runs on a Java Card runtime. The linking is performed using the .exp file. So the contents of the actual classes is not important during linking, and they are not used during execution either (unless you are running on jCardSim of course).
So it's quite often that you get a .jar that contains all the public interfaces, classes and methods but doesn't contain any implementation (other than return null
or return 0
where required).
It may even be possible to generate your own stub and link against that if you know the full interface (from the Java Doc).
Upvotes: 5