BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-28-2009, 06:29 PM   #1
doni49
Thumbs Must Hurt
 
Join Date: Aug 2009
Model: Tour
PIN: N/A
Carrier: Verizon
Posts: 84
Default Built HelloWorld App; No Errors; But Can't get it to run in Simulator

Please Login to Remove!

I downloaded and built the HelloWorld App (finally got it to build without errors after a lot of effort).

But when I try to "Run" it using the simulator, it never appears in the device's home screen. I did create an icon (80x80) and assign it to the project and set it to position 1 on the home screen.

I'm lost.
__________________
Don

Handspring Visor -> Handspring Visor Deluxe -> Palm Treo 650 on VZW -> Palm Treo 700p on VZW -> Blackberry Tour 9360 on VZW
Offline  
Old 09-28-2009, 07:15 PM   #2
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default

What simulator are you using?

Did you check the "downloads" folder?

Did you make your project "Active" (only the active project is copied to the simulator).
Offline  
Old 09-28-2009, 07:45 PM   #3
doni49
Thumbs Must Hurt
 
Join Date: Aug 2009
Model: Tour
PIN: N/A
Carrier: Verizon
Posts: 84
Default

Quote:
Originally Posted by Dougsg38p View Post
What simulator are you using?

Did you check the "downloads" folder?

Did you make your project "Active" (only the active project is copied to the simulator).


No--I didn't realize I needed to make it "active". I just did and the errors are back. I guess it wasn't compiling after all.

This is what I get when it does try to build....
Quote:
Executing rapc for the project HelloWorld at Mon Sep 28 19:15:45 EDT 2009.
C:\Program Files\Eclipse\plugins\net.rim.eide.componentpack4. 5.0_4.5.0.16\components\bin\launcher.exe C:\Program Files\Eclipse\plugins\net.rim.eide.componentpack4. 5.0_4.5.0.16\components\bin\rapc.exe -quiet import="C:\Program Files\Eclipse\plugins\net.rim.eide.componentpack4. 5.0_4.5.0.16\components\lib\net_rim_api.jar" codename=..\HelloWorld\HelloWorld ..\HelloWorld\HelloWorld.rapc -sourceroot=D:\Users\Don\workspace\HelloWorld\src D:\Users\Don\workspace\test\homicon.jpg D:\Users\Don\workspace\HelloWorld\bin
Warning!: No entry points found
Warning!: No definition found for exported static routine: .main(String[])
rapc executed for the project HelloWorld
BTW--I'm using Eclipse. And the simulator I'm running is Tour 9630.
__________________
Don

Handspring Visor -> Handspring Visor Deluxe -> Palm Treo 650 on VZW -> Palm Treo 700p on VZW -> Blackberry Tour 9360 on VZW
Offline  
Old 09-28-2009, 10:41 PM   #4
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default

Sounds like you app does not have a public main() routine?
Offline  
Old 09-30-2009, 09:55 PM   #5
doni49
Thumbs Must Hurt
 
Join Date: Aug 2009
Model: Tour
PIN: N/A
Carrier: Verizon
Posts: 84
Default

Quote:
Originally Posted by Dougsg38p View Post
Sounds like you app does not have a public main() routine?
That's what I thought too. And being new, I'm not sure whether this is right or not. I created a NEW workspace called "HelloWorld". Then created a NEW project called "HelloWorld". Then created and attached a new java file called HelloWorld.jaava. That file contains the following code:
Code:
/**
 * HelloWorld.java
 * Copyright (C) 2001-2003 Research In Motion Limited. All rights reserved.
 */
package com.rim.samples.helloworld;

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.system.*;

/*
 * BlackBerry applications that provide a user interface
 * must extend UiApplication.
 */
public class HelloWorld extends UiApplication
{
        public static void main(String[] args)
        {
                //create a new instance of the application
                //and start the application on the event thread
                HelloWorld theApp = new HelloWorld();
                theApp.enterEventDispatcher();
    }
        public HelloWorld()
        {
                //display a new screen
                pushScreen(new HelloWorldScreen());
        }
}

//create a new screen that extends MainScreen, which provides
//default standard behavior for BlackBerry applications
final class HelloWorldScreen extends MainScreen
{
        public HelloWorldScreen()
        {

                //invoke the MainScreen constructor
                super();

                //add a title to the screen
                LabelField title = new LabelField("HelloWorld Sample", LabelField.ELLIPSIS
                                | LabelField.USE_ALL_WIDTH);
                setTitle(title);

                //add the text "Hello World!" to the screen
                add(new RichTextField("Hello World!"));
        }

        //override the onClose() method to display a dialog box to the user
        //with "Goodbye!" when the application is closed
        public boolean onClose()
        {
            Dialog.alert("Goodbye!");
            System.exit(0);
            return true;
        }
}
new HelloWorldScreen;
Once I know it builds, then I'll start working on understanding how to add other functions.
__________________
Don

Handspring Visor -> Handspring Visor Deluxe -> Palm Treo 650 on VZW -> Palm Treo 700p on VZW -> Blackberry Tour 9360 on VZW
Offline  
Old 10-01-2009, 12:56 AM   #6
sahil_khanna
New Member
 
Join Date: Aug 2009
Model: 8300
PIN: N/A
Carrier: None
Posts: 12
Default

Create a new project and use the following code. Initially, set a breakpoint on the first statement HelloWorld theApp = new HelloWorld(); and debug the application. Also avoid using image at the first go.

Code:
/**
 * HelloWorld.java
 * Copyright (C) 2001-2003 Research In Motion Limited. All rights reserved.
 */
package com.rim.samples.helloworld;

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.system.*;

/*
 * BlackBerry applications that provide a user interface
 * must extend UiApplication.
 */
public class HelloWorld extends UiApplication
{
        public static void main(String[] args)
        {
                //create a new instance of the application
                //and start the application on the event thread
                HelloWorld theApp = new HelloWorld();
                theApp.enterEventDispatcher();
        }
        
        public HelloWorld()
        {
                //display a new screen
                pushScreen(new HelloWorldScreen());
        }

//create a new screen that extends MainScreen, which provides
//default standard behavior for BlackBerry applications
final class HelloWorldScreen extends MainScreen
{
        public HelloWorldScreen()
        {

                //invoke the MainScreen constructor
                super();

                //add a title to the screen
                LabelField title = new LabelField("HelloWorld Sample", LabelField.ELLIPSIS
                                | LabelField.USE_ALL_WIDTH);
                setTitle(title);

                //add the text "Hello World!" to the screen
                add(new RichTextField("Hello World!"));
        }

        //override the onClose() method to display a dialog box to the user
        //with "Goodbye!" when the application is closed
        public boolean onClose()
        {
            Dialog.alert("Goodbye!");
            System.exit(0);
            return true;
        }

	}
}
Offline  
Old 10-01-2009, 10:12 PM   #7
doni49
Thumbs Must Hurt
 
Join Date: Aug 2009
Model: Tour
PIN: N/A
Carrier: Verizon
Posts: 84
Default

Thanks--when I did that, a dialog box popped up that had the following message.

Quote:
The "net_rim_speech_data_en_us.debug" file is missing. Please choose the missing file.
Followed by these additional messages.....
Quote:
The "net_rim_speech_data_en_us-1.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-2.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-3.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-4.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-5.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-6.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-7.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-8.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-9.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-10.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-11.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-12.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-13.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-14.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-15.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-16.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-17.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-18.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-19.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-20.debug" file is missing. Please choose the missing file.
Quote:
The "net_rim_speech_data_en_us-21.debug" file is missing. Please choose the missing file.
__________________
Don

Handspring Visor -> Handspring Visor Deluxe -> Palm Treo 650 on VZW -> Palm Treo 700p on VZW -> Blackberry Tour 9360 on VZW

Last edited by doni49; 10-01-2009 at 10:20 PM..
Offline  
Old 10-01-2009, 11:31 PM   #8
pritesh_bb
New Member
 
Join Date: Oct 2009
Model: 8310
PIN: N/A
Carrier: Airtel
Posts: 3
Default

Quote:
Originally Posted by doni49 View Post
Thanks--when I did that, a dialog box popped up that had the following message.



Followed by these additional messages.....
chk ur package structure...der might be problems with packages...as u said u have created .java in helloworld project...and u have mentioned package "com.rim.samples.helloworld"...


Thanks,
Pritesh
Offline  
Old 10-01-2009, 11:54 PM   #9
sahil_khanna
New Member
 
Join Date: Aug 2009
Model: 8300
PIN: N/A
Carrier: None
Posts: 12
Default

This behavior occurs when some files of the same or different workspace, related to applications loaded in the simulator, are either relocated or deleted. You just need to click "Don't ask again" to proceed further. This wont affect the functionality of the "Hello World" app, neither on the simulator nor on the real device.
Offline  
Old 10-02-2009, 11:17 PM   #10
doni49
Thumbs Must Hurt
 
Join Date: Aug 2009
Model: Tour
PIN: N/A
Carrier: Verizon
Posts: 84
Default

Thanks all. But still no good. I thought maybe the installation was corrupted somehow so I completely uninstalled Eclipse, Java--all the stuff related to BB development that I had installed and then reinstalled everything from scratch.

When I try to debug the code that sahil_khanna posted, I get the error messages that I previously posted. If I do press "don't ask", it eventually just tells me that it "Some debug information is missing. Not all applications may be debuggable." Then as I was writing this, I noticed that all of the files it previously said it had trouble loading had the word "debug" in them. Then it finishes loading the simulator. But HelloWorld never shows up anywhere on the simulated BB.

So I closed the simulator and tried again--this time RUNNING it instead of DEBUGGING. But even though HelloWorld still doesn't show up on the BB, there are no error messages in Eclipse.
__________________
Don

Handspring Visor -> Handspring Visor Deluxe -> Palm Treo 650 on VZW -> Palm Treo 700p on VZW -> Blackberry Tour 9360 on VZW
Offline  
Old 10-03-2009, 09:04 AM   #11
sorayathomas
New Member
 
Join Date: Oct 2009
Location: Toronto
Model: 8130
PIN: N/A
Carrier: Telus
Posts: 13
Default

When you say "doesn't show up in the simulator" - do you mean you can't find the app icon, or that when you run it nothing happens?

One other idea is to switch simulators Run -> Run Configurations... -> Simulator tab -> Profile Dropdown: choose something different -> Apply,Run
Offline  
Old 10-03-2009, 09:26 AM   #12
doni49
Thumbs Must Hurt
 
Join Date: Aug 2009
Model: Tour
PIN: N/A
Carrier: Verizon
Posts: 84
Default

Quote:
Originally Posted by sorayathomas View Post
When you say "doesn't show up in the simulator" - do you mean you can't find the app icon, or that when you run it nothing happens?
There's no icon. I thought that maybe I was just overlooking the icon--so I went in to the project properties and turned on "Auto Run at Startup". It still doesn't run.

Quote:
Originally Posted by sorayathomas View Post
One other idea is to switch simulators Run -> Run Configurations... -> Simulator tab -> Profile Dropdown: choose something different -> Apply,Run
I tried letting it use "default"--which when it loaded was an 8300--and was greeted with a new error message dialog:

Title = "API Failure (DE372)"
Message = "API Mismatch Apps: 115, OS: 96.0)"

And the simulator shuts down.
__________________
Don

Handspring Visor -> Handspring Visor Deluxe -> Palm Treo 650 on VZW -> Palm Treo 700p on VZW -> Blackberry Tour 9360 on VZW
Offline  
Old 10-03-2009, 08:24 PM   #13
doni49
Thumbs Must Hurt
 
Join Date: Aug 2009
Model: Tour
PIN: N/A
Carrier: Verizon
Posts: 84
Default

I ran it with the debug option and copy/pasted everything from the Output window. That output is attached. Can someone PLEASE take a look and help me decipher this?

Thanks.
Attached Files
File Type: txt BBSimOutput.txt (44.7 KB, 6 views)
__________________
Don

Handspring Visor -> Handspring Visor Deluxe -> Palm Treo 650 on VZW -> Palm Treo 700p on VZW -> Blackberry Tour 9360 on VZW
Offline  
Old 10-04-2009, 03:33 PM   #14
sorayathomas
New Member
 
Join Date: Oct 2009
Location: Toronto
Model: 8130
PIN: N/A
Carrier: Telus
Posts: 13
Default

Had a look at the dump, but I'm not that experienced. Somewhat similar to what I see, though I don't get the "...who has NO tunnels open - defocus NOT called" message. I don't know if that's significant.

One other idea is to try and open it from the simulator directly - you can launch a simulator if you can find the path, eg:
C:\Program Files (x86)\Research In Motion\BlackBerry Smartphone Simulators 4.6.0\4.6.0.267 (8220-OrangeFR)\8220-OrangeFR.bat

File -> Load Java Program...

... and then choose your hello world .cod file
Offline  
Old 10-06-2009, 10:19 PM   #15
doni49
Thumbs Must Hurt
 
Join Date: Aug 2009
Model: Tour
PIN: N/A
Carrier: Verizon
Posts: 84
Default

Thanks all!

Still not sure what was wrong, but I started over again with a new workspace and new source files.

It now builds and shows up in the simulator--AND I CAN RUN THE APP IN THE SIMULATOR TOO!

Now to start working on some real apps!
__________________
Don

Handspring Visor -> Handspring Visor Deluxe -> Palm Treo 650 on VZW -> Palm Treo 700p on VZW -> Blackberry Tour 9360 on VZW
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


GENERAC IGNTION COIL 0G3224TA picture

GENERAC IGNTION COIL 0G3224TA

$30.00



Strarns  6-1-95504-1 Coil picture

Strarns 6-1-95504-1 Coil

$359.40



F3040007 P1 COIL picture

F3040007 P1 COIL

$439.20



General Electric 3245059 SYN coil picture

General Electric 3245059 SYN coil

$599.20



Appleton Aluminum Trim Coil 24

Appleton Aluminum Trim Coil 24" x 50' x .019" Royal Brown White Flashing Roll Ro

$111.96



Dental Orthodontic Niti Open Coil Spring Spool .008/010/012/014 Inch 914mm picture

Dental Orthodontic Niti Open Coil Spring Spool .008/010/012/014 Inch 914mm

$334.39







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.