02-16-2009 03:41 AM
I have a project named FooLibrary inside a workspace. And in that project is a single file which exposes a single class. I set that project to type "Library" (project properties->Application->project type). And build it and the world is a happy place. Then I create a new workspace and a new project inside the work space. I add the file FooLibrary.jar (produced by the above) to that project. Then I add another project to this workspace, make it depend on the project that has FooLibrary.jar in it. I add an instance of class FooLibrary in that project. I build it and it builds. Then when I run it, I hit a verification error 1610.
Oddly enough, if instead of making FooLibrary a library, I make it of type CLDC Application (the default type). then when I compile FooLibrary I get some warnings but otherwise absolutely everything works.
Am I missing something obvious here, or am I really confused about the world?
As always, thanks for everything!
Solved! Go to Solution.
02-16-2009 06:35 AM
If you take a look into jar file created by JDE you notice that it is not correct jar file to be included as library.
It contains *.cso *.csl and *.cod file inside.
02-16-2009 06:38 AM
To look inside of jar file use WinZip application, or just rename this jar file to zip and unzip it.
Also you can give command in command line:
jar.exe -t FooLibrary.jar
it will list contents of this jar file on the console.
02-16-2009 06:46 AM
If you want to make a library - add relevant source files to a "Library" type project in JDE and compile it to jar file.
After that - delete cod cso and csl file from this jar file.
And try to import this jar in project properties dialog.
08-15-2009 11:23 AM - edited 08-15-2009 03:46 PM
05-14-2012 06:03 AM - edited 05-14-2012 06:04 AM
I had success when using Eclipse, by changing the type to MIDlet instead of library or CDLC.
Add the resulting JAR file to your project, remember to Export it too.
Project should compile properly without verification problems.
In case it helps, here is my stackoverflow post... http://stackoverflow.com/questions/9976940/blackbe