J2ME is Java Micro Edition. It’s use to do programming in a small devices. For example Mobile Phone, Pocket PC or Any device that support Java Virtual Machine. Well Java is everywhere, my first experience with Java was in 1997. It’ s a promising programming language. With paradigm write once, run everywhere. Even, it’s not as good in reality, but it’s still among the widest distribution programming language in the world.
So , if you are interested to build games for mobile phone, dictionary software on mobile device, tools in pocket pc, you can learn how to use J2ME. It’s quite complicated at first. There are so many JAVA technology avaialble. If you are newbie you might get confuse to choose the right tool.
Java is open source, there are plenty of open source tools that you can use to make JAVA progrmaming easier. The popular one are netbean and elipse..
I recommended J2ME in a Nutshell book if you are interested.
Example topic in this book..
What Is the J2ME Platform?
In the early 1990s, Sun Microsystems created a new programming language called Oak as
part of a research project to build consumer electronics products that relied heavily on
software. The first prototype for Oak was a portable home controller called Star7, a small
handheld device with an LCD touchscreen and built-in wireless networking and infrared
communications. It could be used as remote control for a television or VCR and as
an electronic program guide, and it also had some of the functions that are now associated
with PDAs, such as appointment scheduling. Software for this type of device needs to be
extremely reliable and must not make excessive demands on memory or require an extremely
powerful (and therefore expensive) processor. Oak was developed as a result of the
development team’s experiences with C++, which, despite having many powerful features,
proved to be prone to programmer errors that affected software reliability. Oak was designed
to remove or reduce the ability for programmers to create problems for themselves by
detecting more errors at compile time and by removing some of the features of the C++
language (such as pointers and programmer-controlled memory management) that seemed to
be most closely associated with the reliability problems. Unfortunately, the market for the
type of devices that the new language was intended for did not develop as Sun hoped, and no
Oak-based devices were ever sold to consumers. However, at around the same time, the
beginnings of public awareness of the Internet created a market for Internet browsing
software. In response to this, Sun renamed the Oak programming language Java and used it to
build a cross-platform browser called HotJava. It also licensed Java to Netscape, which
incorporated it into its own popular browser, at the time the undisputed market leader. Thus,
the world was introduced to Java applets.
J2ME is a platform for small devices that is intended eventually to replace the various JDK
1.1-based products with a more unified solution based on Java 2. Unlike the desktop and
server worlds targeted by J2SE and J2EE, the micro-world includes such a wide range of
devices with vastly different capabilities that it is not possible to create a single software
product to suit all of them. Instead of being a single entity, therefore, J2ME is a collection of
specifications that define a set of a platforms, each of which is suitable for a subset of the total
collection of consumer devices that that fall within its scope. The subset of the full Java
programming environment for a particular device is defined by one or more profiles, which
extend the basic capabilities of a configuration. The configuration and profile or profiles that
are appropriate for a device depend both on the nature of its hardware and the market to which
it is targeted.
J2ME currently defines two configurations:
Connected Limited Device Configuration (CLDC)
CLDC is aimed at the low end of the consumer electronics range. A typical CLDC
platform is a cell phone or PDA with around 512 KB of available memory. For this
reason, CLDC is closely associated with wireless Java, which is concerned with
allowing cell phone users to purchase and download small Java applications known as
MIDlets to their handsets. A large and growing number of cell phone vendors have
signed agreements with Sun Microsystems that will allow them to begin using this
technology, so the number of handsets with the capability to be programmed in Java
will probably grow rapidly in the next few years.
Connected Device Configuration (CDC)
CDC addresses the needs of devices that lie between those addressed by CLDC and
the full desktop systems running J2SE. These devices have more memory (typically 2
MB or more) and more capable processors, and they can, therefore, support a much
more complete Java software environment. CDC might be found on high-end PDAs
and in smart phones, web telephones, residential gateways, and set-top boxes.
The current list of JSRs, including those that have been completed, can be found on the JCP
web site at http://jcp.org/jsr/all/. The JSRs that define the current J2ME configurations and
profiles are as follows:
Number Scope
JSR 30 J2ME Connected Limited Device Configuration (CLDC)
JSR 37 Mobile Information Device Profile for the J2ME Platform (MIDP)
JSR 75 PDA Profile for the J2ME Platform
JSR 36 J2ME Connected Device Configuration (CDC)
JSR 46 J2ME Foundation Profile
JSR 129 Personal Basis Profile Specification
JSR 62 Personal Profile Specification
JSR 66 J2ME RMI Profile
JSR 134 Java Game Profile
1.3 J2ME and Other Java Platforms
J2ME is intended to be the way ahead for Java on small devices, but, as noted at the
beginning of this chapter, there are other Java platforms already in existence (and in use) that
have similar scope. The following sections briefly summarize these alternative platforms and
compare them to J2ME.
JavaCard
JavaCard is a platform aimed at smart card technology. Smart cards are the smallest
environment for which a Java platform exists. The constraints of these devices are such that
the JavaCard virtual machine and the small set of Java class libraries that it supports require
only around 16 KB of non-volatile memory and 512 bytes of volatile memory. The scope of
J2ME does not extend to platforms with this little resource, so there is no J2ME configuration
that is suitable for the current generation of smart cards. You can find more information about
JavaCard at http://java.sun.com/products/javacard/.
EmbeddedJava
EmbeddedJava is a JDK 1.1-based platform that is used to create software for embedded
devices. These devices typically have a 32-bit processor with 512 KB of ROM and 512 KB of
RAM available for the VM, class libraries, and embedded application. Since embedded
devices generally serve only one purpose, it is unnecessary to include parts of the Java
platform that the application does not require. In fact, EmbeddedJava allows the implementor
to remove any package or class — or even a method within a class — that is not required, in
order to fit the final product into the memory available. The EmbeddedJava specification,
which can be found at http://java.sun.com/products/embeddedjava/, defines only the
maximum possible content of the platform, rather than a minimum (as is the case with J2ME
specifications).
EmbeddedJava is currently undergoing its end-of-life cycle, which means that it will no
longer be supported as of January 1, 2003. In the future, developers in embedded
environments will probably migrate to CDLC and one of its profiles, which are targeted to
devices with similar resources.
PersonalJava
PersonalJava is intended for a much more general application environment than
EmbeddedJava. The target devices for Personal Java have up to 2 MB of ROM and at least 1
MB of RAM available for the Java platform itself, with more required for application
software. Some of the larger PDAs and communicator devices, such as the Compaq iPAQ and
the Nokia 9210 cell phone, are currently using the PersonalJava environment.
J2me tutorial
Compiling and Running Code with the KVM
In order to compile and run applications using the KVM, you need to download and install the
following software:
• The Java 2 SDK or a development environment that has a command-line Java
compiler
• Sun’s CLDC reference implementation
If you don’t already have a suitable Java 2 SDK installed, you can download one from
http://java.sun.com/j2se/.
The CLDC reference implementation contains source code and documentation for Sun’s
CLDC implementation, which runs on Microsoft Windows, Linux, and Solaris, and it also
contains the KVM and its associated tools in executable form. It can be obtained from
http://java.sun.com/products/cldc/.
The reference implementation is provided in the form of an archive suitable for your target
platform, which you should unpack into a convenient directory. In the rest of this section,
we’ll use the following variables to refer to the installation directories for both the Java 2 SDK
and the CLDC reference implementation:
J2ME in a Nutshell
22
%JAVA_HOME% (Windows) or $JAVA_HOME (Linux/Solaris)
The base installation directory for the Java 2 SDK. For Windows, this is typically
c:\jdk1.3.1.
%CLDC_HOME% (Windows) or $CLDC_HOME (Linux/Solaris)
The base installation directory for the CLDC reference implementation, such as
c:\CLDC. The archive unpacks itself into a directory called j2me_cldc beneath this
location.
%CLDC_PATH% (Windows) or $CLDC_PATH (Linux/Solaris)
The bin directory beneath the CLDC installation directory. Equal to
%CLDC_HOME%\j2me_cldc\bin for Windows and $CLDC_HOME/j2me_cldc/bin
for Linux and Solaris.
Example 2-1. A Trivial KVM Application
package ora.ch2;
public class HelloWorld {
public static void main(String[] args) {
System.out.println(“Hello, KVM world”);
}
}
The first step is to open a command window (or a shell if you’re using Linux or Solaris) and
set the PATH variable to include the executable files for both the Java 2 SDK and the CLDC
reference implementation. For Windows, the following command should be used:
PATH=%JAVA_HOME%\bin;%CLDC_PATH%\win32;%PATH%
If you are using Linux or Solaris, you’ll need to use the appropriate command for your chosen
shell and also make sure that you pick the correct directory for the CLDC executables, which
is $CLDC_PATH/linux or $CLDC_PATH/solaris.
The second step is to compile the example source code to produce a class file. In order to
simplify the following commands, change your working directory to %EXAMPLES%\src, the
directory in which the example source code is installed, and then type the following
commands:
mkdir tmpclasses
javac -bootclasspath %CLDC_PATH%\common\api\classes -d tmpclasses
ora\ch2\HelloWorld.java
J2ME in a Nutshell
23
These commands compile the source file ora\ch2\HelloWorld.java, creating a single class file
called tmpclasses\ora\ch2\HelloWorld.class. A couple of points are worth noting:
• We used the -d command line option to direct the compiler to put the class file into a
directory under the newly created tmpclasses directory instead of in the same directory
as the source file, which is the default. This is because all class files to be loaded into
the KVM have to be preverified (see Section 2.1.2.3) before they can be used, which
involves creating a modified class file. We’ll use the class file under tmpclasses as
input to the preverification process and write the output class file to the source file
directory.
• When running the Java compiler, we used the -bootclasspath option to change the
location from which the core classes are loaded during compilation. As you’ll see in
Section 2.2, CLDC does not include all the packages and classes available to a J2SE
application, so we need to be sure that the compiler picks up the CLDC core libraries
instead of those for J2SE, which it would use by default. If we had not done this, it
would be possible to compile code that referenced J2SE APIs that are not available in
CLDC. This would produce a legal class file that would subsequently fail to load into
the KVM.
Before you can use the class file with the KVM, it has to be preverified using the preverify
command that is included in the CLDC reference implementation. To preverify the class file
and write the preverified version to the same directory as the original source code, use the
following command:
preverify -classpath %CLDC_PATH%\common\api\classes;tmpclasses -d .
ora.ch2.HelloWorld
The -classpath command-line option indicates the directories in which the preverify command
should look for class files, both the core Java libraries and the class file to be preverified,
while the -d option is used to control where the preverified class file will be written. The
directory names supplied with the -classpath option should be separated by semicolons on the
Windows platform, colons in the case of Linux or Solaris. Notice that the compiler requires a
source filename, but preverify needs a fully qualified Java class name (with its parts separated
by periods) instead.
In the case of an application that consists of more than one class file, all class files must be
preverified, although not necessarily at the same time. There are two ways to arrange for
preverify to operate on more than one class file at a time. The most obvious way is to list all
of the classes on the command line:
preverify -classpath %CLDC_PATH%\common\api\classes;tmpclasses -d .
ora.ch2.HelloWorld ora.ch2.Help
Alternatively, if you supply one or more directory names on the command line, preverify
recursively searches them and processes every class file and each ZIP and JAR file that it
finds:
preverify -classpath %CLDC_PATH%\common\api\classes -d . tmpclasses
Notice that in this case, there was no need to include tmpclasses in the -classpath argument
because its presence is inferred from the fact that it is the directory to be searched.
2.2.3 The java.io Package
CLDC provides only a limited subset of the extensive J2SE java.io package. The only input
and output streams that you can connect to a real data source or sink are
ByteArrayInputStream and ByteArrayOutputStream. These streams can be used to read
from or write into a byte array directly, or, wrapped with a DataInputStream or
DataOutputStream, they provide a way of storing or transmitting primitive Java data types.
Access to all other data sources is provided by private InputStream and OutputStream
implementations that are obtained by calling methods on other classes. The most important
examples of this pattern are the openInputStream( ) and openOutputStream( ) methods
of the StreamConnection interface, which is part of a generic framework that is used to
access external data sources. This is described in detail in Section 6.1.
The CLDC java.io package also retains support for character input and output by wrapping
byte streams with an InputStreamReader or OutputStreamWriter. However, the set of
character encodings that can be used with these classes is implementation-dependent and is
required to extend only to the device’s default encoding. Self-contained Reader and Writer
classes like FileReader and StringWriter are not part of the CLDC specification
MIDlet Execution Environment and Lifecycle
All MIDlets are derived from the abstract base class javax.microedition.midlet.MIDlet,
which contains methods that the MIDP platform calls to control the MIDlet’s lifecycle, as well
as methods that the MIDlet itself can use to request a change in its state. A MIDlet must have
a public default constructor (that is, a constructor that requires no arguments), which may be
one supplied by the developer if there is any initialization to perform or, when there are no
explicit constructors, the empty default constructor inserted by the Java compiler. This is what
a skeleton MIDlet class might look like:
J2ME in a Nutshell
58
Java-Mobile programming is is an artificial language designed to express computations that can be performed by a machine, particularly a computer.
Download Java-Mobile programming compiler.
Java-Mobile programming Hello world sample source code.
Java-Mobile programming tutorial.
This video shows some of the examples that can be programmed with the book by Thomas Lucka: “Mobile Games”. The book is published by Hanser, Germany and available through book retailers, ISBN: 978-3446411975. Although the book is written in German the source code might be useful for foreign readers as it contains many fast algorithms to program professional mobile games for Java-enabled handsets.
A Video that introduces the programming language JAVA in a broad perspective. Starring: Yuniel Barbon Megan Sordo Gabi Garcia David Saenz Directed, Edited, and Music Composition by: Emil Cobarrubia
An introduction to writing computer games in Java with the Greenfoot environment (www.greenfoot.org). A higher resolution version of this video is here: www.greenfoot.org

A funny old commercial for Sun’s Java platform. I wonder if we have this problem at the UN. lol Year: 2000
Landlord Pairote has just sold the villagers out with the intention of flattening the village and replacing the land with a casino! Now, destruction is nigh upon the village as tractors and bulldozers start rolling in but all hope is not lost yet as Dawan, following on Wichiens riddle, sets out to find the Ancient Decree for the land bestowed on the villagers by King Ramelan many years ago, the one object that will strip Pairote of his iron grip. However, the journey will not be simple Will Dawan be able to find the Decree in time and save her village? All of these lie in the palms of the players hands. The player plays as Dawan, who has embarked on a journey to recover the ancient decree hidden in the haunted temple. On her way to get the decree, Dawan will face difficulties of different natures in her journey. Developed by: Chew Yong Wee (Programming Lead) Tan Sue-Anne (2D Artist) Ng Tio Yong (Level Designer) Yeo Chit Chiang (Assistant Artist) Supervisor: Alvin Tang Diploma in Information Technology (Game Development Option)
Programming Languages and Design Concepts (PLDC )
Video Rating: 4 / 5
This is my second J2ME game, it’s not finished, i currently developing it. More info on my site: nords.fw.hu Ez a második j2me játék amit mobilra fejlesztek, még csak félkész állapotban. Több infó az oldalamon: nords.fw.hu
Video Rating: 5 / 5

Gameloft Programming Test Tetris style game in java Objective: contruct tetris block’s, except T’s Programmed by Jessarel
In this Tutorial I’ll be showing you how to play JAVA (Mobile phone) Games on your PSP! It Was Tested on 5.00m33-6, but it should work on every CFW
so have fun and please Subscribe! How I Earn Prizes Like PSPs: www.youtube.com PSPKVM: www.megaupload.com My Collection of JAVA Games: www.megaupload.com To Extract files you will need Winrar, Here is the link: www.win-rar.com Check out my Channel for more PSP videos: www.youtube.com ________________________________________ PLEASE WATCH MY VIDEOS AND SUBSCRIBE!!!!!
Video Rating: 5 / 5
Move the marker on MapView with Zoom Control Seekbar android-er.blogspot.com
Video Rating: 0 / 5