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
salveo_8130
Posts: 17
Registered: ‎07-30-2008

can't see the alternate entry point icon

I created 3 projects in one workspace, a background app, an UI entry point app, and a resource project. The UI entry point contains only an image file serving as the application icon and with the property of "Arguments passed..." set as "gui". I also set its home screen position as 1. I set all 3 projects active and clicked Go to debug, but only the background app was seen auto-started on the simulator. There is no icon shown on the home screen to serve as an alternate entry point. What stupid mistakes have I possibly made? Thanks to anyone providing help!

 

BTW, the "Alternate entry point for: " drop box is grey, though filled by the IDE with the correct background app's name.

 

 

Please use plain text.
Administrator
MSohm
Posts: 14,064
Registered: ‎07-09-2008
My Carrier: Bell

Re: can't see the alternate entry point icon

[ Edited ]

Does your entry point with an icon have the "System module" option checked in its project properties?  If so, no icon would be shown.

 

 

Also, what BlackBerry simulator are you using?  The icons can show up in different places in different themes.  For example, in the BlackBerry Bold simulator they show up under the Downloads folder.

Message Edited by MSohm on 08-15-2008 01:58 PM
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
Please use plain text.
Developer
salveo_8130
Posts: 17
Registered: ‎07-30-2008

Re: can't see the alternate entry point icon

Thanks for your quick reply!

 

I didn't have "system module" checked for the entry app. The simulator I use comes within JDE 4.3, device profile 8130.

 

I ever tried simulating solely my background app as a normal application (not auto-start I mean), and the icon appeared on top of the list on the main screen when I set the position to be 1. Now there is nothing, even within the application folder. I don't see any "download" folder on 8130. I'm quite new to BlackBerry development and never knew about Bold simulator or "themes"...

Please use plain text.
Administrator
MSohm
Posts: 14,064
Registered: ‎07-09-2008
My Carrier: Bell

Re: can't see the alternate entry point icon

[ Edited ]

Please try running clean.bat in the BlackBerry simulator directory to reset it to its default state (wait for the window to close).  Then Clean, Build and run your application. 

 

If you don't see it check to see if your cod file is located in the simulator directory. 

 

Is this happening to all applications or just this one.  If you build any of the samples do they show up in the BlackBerry Simulator?

 

Themes control the look of the BlackBerry.  You can change them under Options, Theme on the BlackBerry.

Message Edited by MSohm on 08-15-2008 03:30 PM
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
Please use plain text.
Developer
salveo_8130
Posts: 17
Registered: ‎07-30-2008

Re: can't see the alternate entry point icon

Hi, Mark,

 

Thanks for keep updating me. I ran the clean.bat, cleaned and rebuilt all the projects, then I saw two warnings: No entry points found and No dfinition found for exported static routine: .main(String[]). How can I have it found?

 

As I mentioned in my original post, the dropoff box in the entry application properties panel is always grey, is this an indication that this option is inactive?? I couldn't find any way to configure it.

 

I don't see any .cod files of my projects in the simulator folder if I use Windows Explorer directly to browse to C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\simulator. But if I click file-> Load Java Program in the simulator to browse, I do see them there. My machine is Vista, not sure if this is the reason...

 

Nice weekend to you and everybody here!

Please use plain text.
Administrator
MSohm
Posts: 14,064
Registered: ‎07-09-2008
My Carrier: Bell

Re: can't see the alternate entry point icon

We could have a couple of issues here.  A problem with the BlackBerry JDE or an issue with your application. 

 

Can you try to build some of the sample applications included with the BlackBerry JDE and see if they appear in the BlackBerry Simulator?

 

Are you working with a BlackBerry CLDC application or are any of your projects a MIDlet?

 

Can you post your main entire method?

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
Please use plain text.
Developer
salveo_8130
Posts: 17
Registered: ‎07-30-2008

Re: can't see the alternate entry point icon

Yeah, I've tried the sample application and seen its icon on the simulator. And it could be executed normally.

 

Below are my "code", a mixture of the slightly modified sample Helloworld project and lines pasted by others in this forum. I am still learning.

 

/* * HelloTest.java * * © <your company here>, 2003-2007 * Confidential and proprietary. */ package HelloTest; import HelloTest.resource.*; import net.rim.device.api.ui.*; import net.rim.device.api.ui.component.*; import net.rim.device.api.ui.container.*; import net.rim.device.api.i18n.*; import net.rim.device.api.system.*; import net.rim.device.api.collection.util.*; /** * */ public class HelloTest extends UiApplication { /** * Entry point for application. public static final long APP_ID = 0xf46f5a7867d69ff0L; public static void main(String[] args) { HelloTest theApp=null; RuntimeStore runtimeStore = RuntimeStore.getRuntimeStore(); boolean isGui= (args != null && args.length > 0 && args[0].equals("gui")); if (isGui) { // check if the thread is already on synchronized (runtimeStore) { theApp = (HelloTest)runtimeStore.get(APP_ID); } } if (theApp != null ) { //bring the thread foreground if already on theApp.requestForeground(); } else { // code to launch the background thread theApp = new HelloTest(isGui); synchronized(runtimeStore) { runtimeStore.put(APP_ID, theApp); } theApp.enterEventDispatcher(); } } public HelloTest(boolean isGui) { // Push the main screen instance onto the UI stack for rendering. this.pushScreen(new HelloTestScreen(isGui)); } } /*package*/ final class HelloTestScreen extends MainScreen implements HelloTestResResource { private static ResourceBundle _resources = ResourceBundle.getBundle(BUNDLE_ID, BUNDLE_NAME); public void hide() { UiApplication.getUiApplication().requestBackground(); } void exit() { RuntimeStore runtimeStore = RuntimeStore.getRuntimeStore(); runtimeStore.remove(HelloTest.APP_ID); System.exit(0); } private MenuItem _hideMenu = new MenuItem("Hide", 110,10) { public void run() { hide(); } }; private MenuItem _exitMenu = new MenuItem("Exit", 110, 10) { public void run() { exit(); } }; protected void makeMenu (Menu menu) { menu.add(_hideMenu); menu.add(_exitMenu); } /** * HelloTestScreen constructor. */ public HelloTestScreen(boolean isGui) { super(DEFAULT_MENU | DEFAULT_CLOSE); // Add a field to the title region of the screen. We use a simple LabelField here. The ELLIPSIS option truncates // the label text with "..." if the text is too long for the space available. setTitle(new LabelField(_resources.getString(HELLOTEST_TITLE), LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH)); // Add a read only text field (RichTextField) to the screen. The RichTextField is // focusable by default. In this case we provide a style to make the field non-focusable. add(new RichTextField(_resources.getString(HELLOTEST_CONTENTSTRING),Field.NON_FOCUSABLE)); Menu menu = new Menu(); makeMenu(menu); } /** * Overrides onClose() in superclass Screen. * @return True if the screen closes; otherwise, false. */ public boolean onClose() { // Display a farewell message before closing application. Dialog.alert(_resources.getString(HELLOTEST_EXITSTRING)); RuntimeStore runtimeStore = RuntimeStore.getRuntimeStore(); runtimeStore.remove(HelloTest.APP_ID); System.exit(0); return true; } }

 

How can I specify the main() as an entry point to avoid the two warnings? BTW, I couldn't paste the screen shot of the properties panel of the alternate entry point project, which does not contain any code.

 

Thank you~~~

Please use plain text.
Developer
salveo_8130
Posts: 17
Registered: ‎07-30-2008

Re: can't see the alternate entry point icon

Oh I forgot to say that the background and alternate entry  projects are both CLDC type, and the resource project a library type.
Please use plain text.
Administrator
MSohm
Posts: 14,064
Registered: ‎07-09-2008
My Carrier: Bell

Re: can't see the alternate entry point icon

Based on the code you have above, your entire main method has been commented out, which is why the BlackBerry JDE is not seeing it.  You'll need to close your /* comment bracket at the top of your class.
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
Please use plain text.
Developer
salveo_8130
Posts: 17
Registered: ‎07-30-2008

Re: can't see the alternate entry point icon

I'm sorry, when I was inserting the code here, I deleted some commented lines from the original code copied from my JDE to make it look shorter. In the JDE, the main method is never commented. It is easy to tell since all commented lines are green.
Please use plain text.