Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
justindutoit
Posts: 405
Registered: ‎05-31-2009
My Device: Not Specified

Where to install a jar file?

Hey. Trying a Flickr API and they provided a jar file for developers.

 

Never done this before. Can I put a jar file somewhere to access it's classes/methods? Tried JDE bin folder ...

 

J

Developer
yosoh
Posts: 213
Registered: ‎07-18-2008
My Device: Not Specified

Re: Where to install a jar file?

Yes, you can do that. Please follow the instructions in this article:

 

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800901/How_To_...

--------------------------------------------------
problemSolved() ? kudosPlease():kudosPlease();
Developer
justindutoit
Posts: 405
Registered: ‎05-31-2009
My Device: Not Specified

Re: Where to install a jar file?

Great start and quick reply too. Now this error compiling. My app has the line

 

Flickr f = new Flickr(apikey);

 

Error is:

 

java.lang.RuntimeException: Warning!: No definition found for method: <init>
com.aetrion.flickr.Flickr: Error!: Missing stack map at label: 25
Error while building project

 

Do you know what a missing stack map is? Tks

 

J

Developer
yosoh
Posts: 213
Registered: ‎07-18-2008
My Device: Not Specified

Re: Where to install a jar file?

It's a preverification error. You have to preverify your Flickr Jar file before you can use it in your application.

 

Go through the following steps below for preverifying:

 

1. Go to your JDE installation folder (C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin)

2. Copy the jar file to bin folder.

3. Now open your command prompt and change your current directory to your JDE installation directory.
4. Now execute the following command:
         preverify -classpath "C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\lib\net_rim_api.jar" "your_jar_filename"
5. In your bin directory(C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin) a folder named output will create.

6. Preverified jar file resides here.

 7. Now take this preverified JAR file and follow the steps given in the article link I posted

 

hope that helps.

--------------------------------------------------
problemSolved() ? kudosPlease():kudosPlease();
Developer
justindutoit
Posts: 405
Registered: ‎05-31-2009
My Device: Not Specified

Re: Where to install a jar file?

Thanks but my DOS is not recognizing preverify as a command (WinXP).

What to do?

 

J

Developer
yosoh
Posts: 213
Registered: ‎07-18-2008
My Device: Not Specified

Re: Where to install a jar file?

There should be preverify.exe file in bin folder of your JDE installation directory.From the command prompt you should change to this directory and then execute the preverify command .

--------------------------------------------------
problemSolved() ? kudosPlease():kudosPlease();
Developer
justindutoit
Posts: 405
Registered: ‎05-31-2009
My Device: Not Specified

Re: Where to install a jar file?

Hi.

 

Error preverifying class com.aetrion.flickr.ParameterAlphaComparator

    java/lang/NoClassDefFoundError: java/Util/Comparator

 

Tks

J

Developer
justindutoit
Posts: 405
Registered: ‎05-31-2009
My Device: Not Specified

Re: Where to install a jar file?

Is it possible the jar file I have is not compatible with the BlackBerry brand of java? i.e. Classes in the jar file don't exist in the BlackBerry system?

 

J