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
New Developer
Posts: 6
Registered: ‎07-13-2010
My Device: Pearl
My Carrier: ATT

Class collision with JRE

I'm messing around with an application using JRE 5.0.

I found a java library that looked like it would have some of the functionality that I needed.  As I was playing around with it, it needed the java.util.Properties class.  However, the JRE 5.0 does not have that.

 

I'm developing in Eclipse, and so I had the thought of adding the full JDK 6 or whatever the latest version is.  It added fine and gave me the Properties class that I needed.

 

However, as you can imagine there was a couple class collisions.  The one that sticks out the most was UTFDataException.  

 

Is there a way that I can have the BB JRE and the full JDK without the collisions?

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Class collision with JRE

Welcome to the forums!

 

Unfortunately, the library you may be using may use functionality that is not part of RIM's extension classes or J2ME (Java 2 Micro Edition).

 

JDK 6 is only required to run the Eclipse environment but a good number of it's classes aren't usable on the BlackBerry platform at this time.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
New Developer
Posts: 6
Registered: ‎07-13-2010
My Device: Pearl
My Carrier: ATT

Re: Class collision with JRE

Ok, thanks.  

 

Is it safe to assume that if something is written for J2ME that it should work with RIMs JRE 5.0?

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Class collision with JRE

In my experience yes and RIM has provided classes that help get around the classes that are missing.

 

The java docs will probably become your best friend in this regard.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful