09-28-2011 04:44 PM
I know this topic has already been raised many times on this forum.
Though, I have been trying to include an external jar library to my BB project for last 7 hours, using all the hints I found here but without success.
Error message "Module xyz has verification errors" displayed when starting my project with a jar library built by Blackberry JDE 6.0.0 in the past.
BB java plugin for Eclipse v. 1.3.0
BB SDK v. 7.0.0..21
Preverifying the jar file was done without problems (no errors reported).
Adding newly preverified file to the project throughout project build path > libraries > add (external) JARs... results in error message as above.
Additionally, checking the jar file in "Order and Export" tab causes another problem: "A Project has to have a jad file file if it exports a mildlet jar"
Creating a new project as library which only includes the jar file and referencing it to the main project didn't bring too much - methods from the external file were not visible and thus importable.
I moved two classes that directly use the methods from the jar file into the library project. Only then I could import them in my main project but still the main error is appearing.
Does anyone of you have had any troubles in importing external jar files in JDE 7.0? Is there a problem with this environment? Maybe I am still doing something wrong.
Thanks for help,
09-29-2011 04:10 AM
thanks for your time. Yes, I did also try this solution as described in my previous post.
If I create a library project in my workspace and then add the JAR file there either as an external JAR file to project's build path or as an ordinary file (throughtout Import>Archive File) or even both at the same time, then set the right depedency on the main project, I cannot import and use methods included in that JAR file attached to library project.
It is only possible to import classes created in a package directly in the library project but it is not what I expect.
What am I doing wrong?
09-29-2011 09:09 AM
two other things to check are
1. if the jar file is compiled with JDE, the project type cannot be "library" but has to be "application"
2. use RIM JDE instead of eclipse... importing lib into eclipse needs some tweaking...
09-30-2011 06:21 AM
thanks for the two additional tips.
Your first idea doesn't work for me, I get another error:
Project myMainProject cannot depend on a non library project mySecondProjectWithJARLibrary
I really cannot understand why there are so many difficulties to perform such a simple and standard operation like adding an extarnal JAR file.
What I found out is when I manually copy the .cod file from the JAR file into the simulator's directory, everything works correctly - module is found, no verification rror appears, there is no need to create additional library project... However, the problem remains when I try to load the application on my real device. I guess, I need to use ANT tool for that... It is just sad and ridiculous. Why can't the BB plugin build and load necessary files itself?