This article explains how to create and deploy a simple HelloWorld MIDlet by using Carbide.J IDE. These steps are easily adaptable to any other IDE you're using for Java ME development.
Important note As explained in Carbide.j page, Carbide.j was discontinued in 2007.
Contents |
Click File --> New Project --> MIDP project --> Write your project name ex:"Hello World" --> select your target device SDK (ex:"S60 emulator") --> Finish
From project menu, select New --> Class --> specify the class name "HelloWorld"
Copy this code to the HelloWorld class file:
import javax.microedition.lcdui.*;
import javax.microedition.midlet.MIDlet;
public class HelloWorld extends MIDlet{
Display display=null;
Form form=null;
public HelloWorld(){
display=Display.getDisplay(this);//get the display controller
form=new Form("Hello World");//get Form instance
form.append("this is my first application");
}
public void startApp(){
display.setCurrent(form);
}
public void destroyApp(boolean arg){
display=null;
form=null;
}
public void pauseApp(){}
}
By using Carbide.j you can now Create your Jar file and deploy it to your device and have fun
Carbide.j Wiki article on Forum Nokia Wiki
No related wiki articles found