03-03-2010 04:35 AM
Hey guys,
I am a computer science student and I have been given the task of developing an application for a mobile device. Because I have a Bold 9000, it was the logical choice.
I have studied Java and I am familiar with the eclipse IDE. I have downloaded and installed the blackberry JDE eclipse plug in, however I'm confused about the configuration. I've scoured though this website and read lots and watched the videos, but I'm just unsure that its working correctly.
For example, I wrote just a daft test class which outputs the word "test", I went to run it in the simulator, but nothing...
Any advice would be great, kinda feel out of my depth here. >.<
Solved! Go to Solution.
03-03-2010 04:42 AM
i would suggest that you start with the sample applications that ship with the jde/ejde. They cover a lot of basic and advanced topics.
as for your output: sysout is printed to the console, not the simulator itself. Be sure to look there.
If you want output on the simulator you have to a) add UI components for this or b) use the Logger class to write into the device log (alt+lglg on the homescreen shows the device log).
03-03-2010 05:53 AM
I think I may have accepted this solution to quickly... I have done this example:
http://na.blackberry.com/developers/resources/A10_
And when I come to run it in the simulator... Nothing. Help. ![]()
03-03-2010 11:50 AM
there is no way we can help you if you do not provide code ![]()
few very basic pointers:
did you set the project as "enable for blackberry"
did you build the project (build BLACKBERRY project, not the normal build from eclipse) prior to starting the sim?
Is the project in the build configuration you launch with your sim?
Do you have the UIApplication.enterEventDispatcher(); method in your main routine?
03-03-2010 02:42 PM
Ok, the project is enabled for blackberry. I made a blackberry project as opposed to a normal java application.
fwest wrote:
Is the project in the build configuration you launch with your sim?
This I'm unsure of what you mean?
The code is as follows:
import net.rim.device.api.ui.UiApplication;
public class Main extends UiApplication
{
public Main()
{
pushScreen(new TestScreen());
}
/**
* @param args
*/
public static void main(String[] args)
{
// TODO Auto-generated method stub
Main m = new Main();
m.enterEventDispatcher();
}
}
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.RichTextField;
import net.rim.device.api.ui.component.Dialog;
public class TestScreen extends MainScreen
{
public TestScreen()
{
super();
LabelField title = new LabelField("Test", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
setTitle(title);
add(new RichTextField("Hello"));
}
public boolean onClose()
{
Dialog.alert("Goodye");
System.exit(0);
return true;
}
}
Thanks for the help, its much appreciated.
03-04-2010 03:18 AM
code looks alright. your app should be visible as a black icon (like a dos box icon on windows), depending on OS version and theme most likely in the download folder.
03-04-2010 04:10 PM
Once again thank you for your help. I've managed to get it to work now, I had to install another simulator then for some reason it worked perfectly.
No doubt I'll be back on in a few hours scratching my head over another simple problem lol.
03-04-2010 04:22 PM
Well we're always willing to help. Don't forget to use the search, though. Your question may have already been answered.