Mek-Hello World Experiment

Introduction



Home Screen :

Name of Experiment : Hello World

Exp No : NOS1

Background : Student should require a basic knowledge of Java.

Summary : After performing, this experiment student should be able to understand the proper flow of Development of J2ME based, NOS application by writing the program , debugging and deploying it on the Emulator or Target Device.

Learning Objective : To Explain the working of NOS by writing Hello World Program.

Target

Target Platform : This application is tested on Windows Phone Emulator and Windows Phone (Lumia 800).

Procedure

Source Code


Source Code : Comments :
MainPage.xaml.cs
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
public class HelloWorld extends MIDlet {
String hello;
Form HelloWorldForm;
public HelloWorld() {
hello=new String("Hello World");
HelloWorldForm=new Form("Hello World");
HelloWorldForm.append(hello);
// TODO Auto-generated constructor stub
}
protected void destroyApp(boolean arg0) throws MIDletStateChangeException
{
// TODO Auto-generated method stub
}
protected void pauseApp() {
// TODO Auto-generated method stub
}
protected void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
Display.getDisplay(this).setCurrent(HelloWorldForm);
}
}




 import require packages
 Declare a String
 Declare a Form
 Create Constructor

 Add the component string on Form









 Display the Form on Emulator as well as on Real Device through inbuilt methods

Snapshots



Fig No. 1


Fig No. 2


Fig No. 3





Fig No. 5


Fig No. 6


Fig No. 7


Fig No. 8


Fig No. 9


Fig No. 10


Fig No. 11

Observation

Observation : It should be noted by Developer that for any kind of J2ME application, step (1-10) need to be repeated.

Reference

  1. Download Nokia IDE
    http://www.oracle.com/technetwork/java/javame/javamobile/download/index.html
  2. Introduction for Nokia IDE 1.0 for Java ME
    http://www.youtube.com/watch?v=wCmUhhWk3gk
  3. Windows 7 on J2ME
    http://www.youtube.com/watch?v=EuSdVzH9j5E
  4. J2ME Tutorial : For Simple Mobile Application
    http://www.youtube.com/watch?v=fcMLVsjljxw

Download

Right Click Here And Select Save Target For Entire Download :

Hello World Experiment