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: 10
Registered: ‎09-10-2009
My Device: Not Specified
Accepted Solution

PlayerListener problems

I'm new to Java and to BB JDE, so I'm sure this is a silly problem I'm having.  I'm trying to use a PlayerListener in my app, but I get the following compiler error:

 

 

incompatible types found : javax.microedition.media.Player required: javax.microedition.media.PlayerListener _player = Manager.createPlayer("...");

 I've tried several import variations, and currently am using this:

 

import javax.microedition.media.*; import javax.microedition.media.Manager;

 

 

 

I tried installing java ME separately, but that didn't help.  As far as I can tell, there is no way to link the java ME libraries into the JDE.  I appreciate any help you can offer.

 

Thanks,

Bek


 

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: PlayerListener problems

javax.microedition.media.Player and javax.microedition.media.PlayerListener are part of standard RIM JDE library. You don't need to link in any extra J2ME libraries at all. May be you aren't compiling against the RIM JDE library at all?
Highlighted
New Developer
Posts: 10
Registered: ‎09-10-2009
My Device: Not Specified

Re: PlayerListener problems

It's definitely possible, I didn't see anywhere to set that up.  The only thing I did when installing the JDE was to set up my Path environment variables to point to the Java JDK and to the BB JDE.

 

Thanks,

Bek 

BlackBerry Development Advisor
Posts: 15,723
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: PlayerListener problems

The BlackBerry library is pre-configured.  There isn't anything you need to configure.

 

Can you post the code for the class that is triggering this build error?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: PlayerListener problems

That error message means you are trying to assign your Player to your PlayerListener object. Check your code to make sure you are using the correct references for your objects.
New Developer
Posts: 10
Registered: ‎09-10-2009
My Device: Not Specified

Re: PlayerListener problems

Yes, that was the problem.  Thanks.  I was trying to createPlayer from a PlayerListener instead of a Player.