views:

19

answers:

1

Hi there

I get these warnings when packaging and of course the application doesnt work on the simulator

Warning!: No entry points found Warning!: MIDlet class is not public

note that the main class is public. any ideas?

A: 

you should start with Hello world example. it will give you a basic idea how to start writing a BB app.

package com.rim.samples.helloworld;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.MainScreen;
public class HelloWorld extends UiApplication
{
public static void main(String[] args)
{
HelloWorld theApp = new HelloWorld();
theApp.enterEventDispatcher();
}
public HelloWorld()
{
pushScreen(new HelloWorldScreen());
}
}
final class HelloWorldScreen extends MainScreen
{
public HelloWorldScreen()
{
super();
LabelField title = new LabelField("HelloWorld Sample",
LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
setTitle(title);
add(new RichTextField("Hello World!"));
}
public boolean onClose()
{
Dialog.alert("Goodbye!");
System.exit(0);
return true;
}
}
Grey