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

New Developer
Posts: 44
Registered: ‎08-06-2009
My Device: Not Specified

Using two Different Classes from different packages



I am developing BB OS 4.6 using eclipse.  I have managed to use the


net.rim.device.api.ui Class Manager by importing it and also the 

javax.microedition.media Class Manager by calling it on the fly (javax.microedition.media.Manager.method())


Is there a way to import both of these classes without having Eclipse throw up red flags?  Eclipse will not allow me to do this unless there is another way.  I have tried importing the entire javax.microedition.media.* package, but when I go to use the Manager class Eclipse does not allow this?


Has anyone run into this issue?


Thank you for any help.

Please use plain text.
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: Using two Different Classes from different packages

Not possible to import both, because then Java could not sort out which you wanted when you say Manager.  The method you have already used is the way to go, i.e. import the one you use most frequently and specify the other using its fully qualified package name. 


For example:

import javax.microedition.media.*;


then use:

net.rim.device.api.ui Class Manager m = Field.getManager();

Please use plain text.