views:

104

answers:

3

I have several libraries that I want to import into my project. They are all Jar files I've created, and they were built using Eclipse, then preverified using the command-line tool.

Now, I'm working in the BlackBerry JDE (not Eclipse) and I've added the Jar files into my main project. Originally, it wouldn't compile, complaining about a stack map error. That's what prompted me to preverify the jars.

Now, I can import classes from the Jars, and it compiles just fine, but as soon as I try to run the application on the simulator and access a class in the Jar, it throws a MissingNativeError.

I've tried separating each Jar file out into its own Library project within the workspace and setting up the project references properly, but nothing changed. The little I've found on this error online isn't helpful. The one person who solved this issue says they did so by changing the Library to a CDLC application, but if I do that, then I can't even set projects to depend on it.

What is the CORRECT way that WORKS to create a library of code that can be included in other projects, other than including the source files in each project? Does it involve using the COD files instead? Is there ANY other way to make it work?

Note: The JAR files are in some other directory not anywhere near the project or workspace, though that shouldn't be a problem. When I compile the project, the libraries show up in the simulator directory, and the jar files contain all the right classes from what I can see.

A: 

Is there any C libraries you need to have properly placed and pointed to, for the Java libraries to work properly?

Thorbjørn Ravn Andersen
This is BlackBerry, and these are pure BlackBerry Java classes. So no.
Ed Marty
A: 

I never solved the issue as such. I just changed the way I was building the project to be the same as the test jar and things started working.

Ed Marty
A: 

I think I've run in to the same problem. How exactly did you solve it with rapc?