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
DD12
Posts: 170
Registered: ‎01-26-2009
My Device: Not Specified

Forward Compatibility - 4.7 to 5.0

Hello Everyone

 

I have created a common library in Eclipse using SDK 4.7 and added that as an external jar to a different project.

 

When I select the 4.7 sdk, the project runs fine on the simulator, but when I select SDK 5.0, I get RunTimeErrror.

 

Running in debug mode, I get class not found error. Its custom class I wrote.

 

I assume that the library projects are forward compatible.

 

Am I missing something?

 

Thanks

 

 

Developer
peter_strange
Posts: 19,609
Registered: ‎07-14-2008
My Device: Not Specified

Re: Forward Compatibility - 4.7 to 5.0

I would look for another issue before deciding there was a problem with a library compatibility.  I've not seen any issues like that, and would think a Library that works in 4.7 should work in 5.0.  Was the Library compiled using 4.7?

Developer
DD12
Posts: 170
Registered: ‎01-26-2009
My Device: Not Specified

Re: Forward Compatibility - 4.7 to 5.0

Hi Peter

 

Thanks for the reply.

 

Yes, the library was compiled in 4.7.

 

If you could provide me a direction for the kind of issues I should look for, that will be great.

 

Thanks

 

Developer
peter_strange
Posts: 19,609
Registered: ‎07-14-2008
My Device: Not Specified

Re: Forward Compatibility - 4.7 to 5.0

I suspect that the jar has not been compiled into a cod and/or the associated cod has not been loaded onto the OS 5.0 SImulator.  This is why you get a class not found.

Developer
DD12
Posts: 170
Registered: ‎01-26-2009
My Device: Not Specified

Re: Forward Compatibility - 4.7 to 5.0

Hi Peter

 

Thanks for the reply.

 

Is there any specific setting I need to change to load the cod file?

 

When I change the SDK of the library to 5.0, the applications run fine on the simulator.

 

Thanks

Developer
br14
Posts: 497
Registered: ‎06-24-2008
My Device: Not Specified

Re: Forward Compatibility - 4.7 to 5.0

[ Edited ]

I may have been overdoing it, but in my experience you have to rebuild the library for 5.0 or other OS version you wish to support. Perhaps this is an IDE specific issue to the eclipse plugin.

 

It's a while since I first tried this, but I believe the eclipse IDE plugin looks for the 5.0 version of the library project when packaging the main project.

 

Could be wrong, but I've been using libraries for the last 18 months without issue by always building for each version in the IDE.

Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: Forward Compatibility - 4.7 to 5.0

I've had no such issue. I have libraries ranging from 4.5 to 6.0 and can use the 4.5 library on 6.0, let alone 4.7 on 5.0.

 

@DD12: I assume the class is in the library? Do you get the exception when you try to run the app, load the app (onto the device), or while the app is running?

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
br14
Posts: 497
Registered: ‎06-24-2008
My Device: Not Specified

Re: Forward Compatibility - 4.7 to 5.0

@rcmaniac25, are you using the eclipse plugin? I'm not saying you can't use the library - just that I had problems using libraries within eclipse. Could be my setup I guess.

 

 

 

 

Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: Forward Compatibility - 4.7 to 5.0

Yes, had no problems with 3.4 (original plugin), 3.5 (now old plugin), and now 3.6.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
br14
Posts: 497
Registered: ‎06-24-2008
My Device: Not Specified

Re: Forward Compatibility - 4.7 to 5.0

[ Edited ]

Must be some other reason then, but I had problems unless I rebuilt the libraries for each OS level. I await the resolution of this thread with interest! Hopefully I'll find the solution to my issue also.

 

Edit.

 

Come to think of it, I was creating a project dependency rather than adding the library as an external JAR since I was editing the library code. Maybe that was the difference.