You Are Here:

Community: Wiki

This page was last modified on 4 June 2009, at 06:58.

How to Start your first application in Java ME

From Forum Nokia Wiki


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

Step 1. Create an empty MIDP project

Click File --> New Project --> MIDP project --> Write your project name ex:"Hello World" --> select your target device SDK (ex:"S60 emulator") --> Finish

Step 2. Create a new empty class

From project menu, select New --> Class --> specify the class name "HelloWorld"

Step 3. Write source code

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(){}
 
}

Step 4. Build and deploy

By using Carbide.j you can now Create your Jar file and deploy it to your device and have fun

Related resources

Carbide.j Wiki article on Forum Nokia Wiki

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fTalkE3aE4cargeE5fscreenE5fsaverX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ
User Rating: qfnZuserE5FratingQNx3E2E0000X