Thursday, December 11, 2008

Your First program in J2ME

a little introduction to the J2ME
well it stands for the java 2 Mobil Edition. There are other two versions , J2SE and J2EE.
However, the J2ME also runs on a virtual machine , but due to the constrains in the
hardware and software resources in the small devices ( what is J2ME target for ) , the J2ME
virtual machine is somewhat different from the J2SE and J2EE virtual machines. It's commonly
known as alias KVM ( the killobyte virtual machine ).

however today we are going to develop a simple J2ME mobil phone application. well J2ME has a
big scope than the writing just software for the mobil markert. well J2ME covers even writing
software for even your television , washing machines like these small or large size devices
that have small computing resources.( well computing resources means hardware resources like
memory storage and computing speed , and software resources like threads processes , operating
systems , libraries and so on ...) .Think this is different from the normal desktop computing environments and server computing environments(high end computing). The application
programming for these kind of devices are just normally doing with special tools , cross compilers
and simulators like software tools and in-circuit debuggers , circuit probes like hardware tools.
well that's how the software for the embedded computers are developing. But in the J2ME ,
we just use just the java compiler but with different libraries to compile it , and for testing we
are using simulators. well today J2ME simulators are compltely prefect actually have less bugs
.Trully speaking leass and leass bugs. so feel free to use them. and those simulators supports
a good amount of debugging. so it's very easy to find your bugs in your program. And the
IDE's like the Netbeans are there for free of charge to make this development more babish.
so unlike other embedded software development the J2ME is just easy.

Allright the tools like the netbeans already avilaible for you ne. Then feel free to use them. Just
go to the www.netbeans.org and download a Netbeans pack that have J2ME integraded.
Opps , before you install the netbeans you need to install the JDK 5.0 or higher. Well they
are free. Then download them and install them.

Come to the Netbeans then , here we goes.
well netbeans is a IDE , that makes the programmers life babish. Believe me you just only need
some more mouse clicks and moves to compile and run your first J2ME mobil phone application.

well first open the Netbeans.

well go to the file menu and click new project.
select mobility and MIDP application.


and then click next . and then next screen give project name , location and folder ( your choices ).
and make sure that "set as main project" and "Create Hello MIDlet" ticked. then press finish.



then compile the project using the 'build' menu 'build main project'. and run it using the 'run' menu 'run main project'

then on the simulator just laungh the midlet.
you can see "Hello World" on the simulator.

No comments: