02-11-2009 01:11 AM
I'm using Eclipse. Compiling with BB component pack 4.7.
I have a main project (CLDC) and a second project (CDLC Alternate Entry Point). The second project is checked system and startup.
note: The second entry point was to register a custom menu item for the app, not about the icon.
I right-click on the "main" Project->Properties->Blackberry Project Properties->Resources.
I select one icon file (1.png) in the "Icon Files" dialog.
I select a second icon file (2.png) in the "Focus Icon Files" dialog.
I clean, compile, run under a "new" Bold (9000) simulator, and my app has the "non-focus" icon.
When I rollover it, it doesn't change.
From what I've read, 4.7 is supposed to make this easy. It appears to be staightforward, so I am sure I am missing something that is obvious (to everyone but me). I am new to Eclipse and Java, but have really been getting the hang of it....until now that is...
Does anyone have ideas why this might not be working?
Solved! Go to Solution.
02-11-2009 08:02 AM
You project has to have an additional entry point with parameter. This additional entry point has to be set as "Autostart". Add to the main entry point the parameter: gui
And check the code below. It works.
public class HomeScreenIcon extends UiApplication
public static void main(String args)
//Check for the argument defined in the project properties.
if (args != null && args.length > 0 && args.equals("gui"))
HomeScreenIcon theApp = new HomeScreenIcon(false);
HomeScreenIcon theApp = new HomeScreenIcon(true);
public HomeScreenIcon(boolean autoStart)
//The application started using the auto start entry point.
//Setup the rollover icons.
final Bitmap regIcon = Bitmap.getBitmapResource("1.png");
final Bitmap icon = Bitmap.getBitmapResource("2.png");
public void run()
ApplicationManager myApp =
boolean keepGoing = true;
//Check if the BlackBerry has completed its startup process.
//The BlackBerry is still starting up, sleep for 1 second.
catch (Exception ex)
//Couldn't sleep, handle exception.
//The BlackBerry has finished its startup process.
//Set the rollover icons.
keepGoing = false;
//Exit the application.
//The application was started by the user.
//Start the application and display a GUI.
MainScreen ms = new MainScreen();
ms.setTitle(new LabelField("Hello there."));
02-11-2009 08:15 AM
02-21-2009 10:24 PM
Thank you for the help. I had tried some of the examples from the KB articles before, but it never worked. I suspect it was the "invokelater()" method that made the real difference.
The fact that I am a "newbie" means that some of the more obvious things, trip me up.
One of the articles I came across suggested that Component Pack 4.7 didn't require the additional code and entry point approach, so I followed those instructions. I didn't understand that the Bold didn't support 4.7 (I figured it was new, why wouldn't it).
Anyway, thanks for the help!
02-22-2009 04:13 AM
JDE version, Component pack version, device OS version - all of them show version of RIM API used.
If you compile your application with RIM API version 4.7 it will run only on Blackberry Storm devices, because only these devices for now have device OS version 4.7
Bold has device OS 4.6 and application compiled with RIM API 4.7 won't run on Bold devices.
08-06-2009 09:11 AM
i am using eJDE 4.6 . I got two problem
1) when i rollover the icon , the icon doesnt change for the first time , untill i click Once on image . After clicking, u move to other icon and come back the rollover works perfect.
2) when i click on rollover image, my project is not working !!!. My apps is not opened .. No Error message !!
Can anyboby Help me !!