Originally posted by Lasse Koskela:
How should one package his application which consists of the application code and a 3rd party .jar file such as kxml.jar? Are there tools for this?
an old trick is to use winzip to unpack the kxml.jar jar..
Remember jars are just enhanced zip files..now that is somewhat oversimplistic in some cases btu for here on this case works very nice..
Originally posted by Fred Grott:
An old trick is to use winzip to unpack the kxml.jar jar.
So there is no "clean" way to include several .jar files into a single "J2ME package"? Ok. I'm fine with exploding the kxml.jar but am a bit surprised there is no way to reference external .jars or something like that.
Well, thanks. I'll go explode some .jars...
Originally posted by Greg Schwartz:
If you put the jar or zip file in your projects /lib directory, the class files in the jar or zip will be deployed upon building. When you package your application those external class files will be included.
Umm... Sounds great but which "project's lib directory" are you talking about? Some specific IDE perhaps?
I used a 3rd party class file for floating point math in one of my applications. I ended up having better luck using a zip file instead of a jar. I had to take the .class file out of the jar and put it in a .zip file in the /apps/APP_NAME/lib directory.
Motorola's iDEN IDE has an npclass and pclass folder. I think you need to get the class files out of the archived jar and place them in the npclass folder before building the application.
I'm using Sun ONE Studio Mobile Edition, which is based on the Wireless Toolkit -- would you happen to know about that IDE's peculiarities? At least the lib folder isn't created by default (I'll re-check that though).
If that doesn't work, let me know what directories are provided in your specific apps directory (the one pertaining to the project you're working on).
Works great (well, except for the small weirdness that I am not able to preverify unless I run the code through an obfuscator first?), integrates with IDEs (via the Ant script), and doesn't let me mess up the build process by clicking the wrong buttons in a GUI. Oh, and it includes the 3rd party .jars for me
[ May 28, 2003: Message edited by: Lasse Koskela ]