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 Contributor
Posts: 8
Registered: ‎03-03-2010
My Device: Blackberry Bold 9000
My Carrier: Orange
Accepted Solution

Newbie BB developer seeking confirmation

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. >.<

Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Newbie BB developer seeking confirmation

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).

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Contributor
Posts: 8
Registered: ‎03-03-2010
My Device: Blackberry Bold 9000
My Carrier: Orange

Re: Newbie BB developer seeking confirmation

I think I may have accepted this solution to quickly... I have done this example:

 

http://na.blackberry.com/developers/resources/A10_Writing_Your_First_Application_V5.pdf

 

And when I come to run it in the simulator... Nothing. Help. Smiley Very Happy

Developer
Posts: 67
Registered: ‎10-14-2009
My Device: Not Specified

Re: Newbie BB developer seeking confirmation

there is no way we can help you if you do not provide code Smiley Wink

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?

-------------
blog: http://coding.westreicher.org
twitter: http://www.twitter.com/meredrica
New Contributor
Posts: 8
Registered: ‎03-03-2010
My Device: Blackberry Bold 9000
My Carrier: Orange

Re: Newbie BB developer seeking confirmation

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.

 

Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Newbie BB developer seeking confirmation

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.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Contributor
Posts: 8
Registered: ‎03-03-2010
My Device: Blackberry Bold 9000
My Carrier: Orange

Re: Newbie BB developer seeking confirmation

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.

 

 

Developer
Posts: 587
Registered: ‎01-19-2010
My Device: BOLD 9700 OS5.0.0.x on Rogers Canada
My Carrier: Rogers

Re: Newbie BB developer seeking confirmation

Well we're always willing to help. Don't forget to use the search, though. Your question may have already been answered.

----------------------------------------------------------------------------
chown -R us ./base
~J!NX