1. Download the Installation Tool
Jdk-1_5_x or jdk1.4.x
J2me_wireless_toolkit-2_2-ml-windows
Eclipse-SDK-3.1 or eclipse-SDK-3.0.x
Eclipseme. feature_0.9.2_site
2. Install JDK and configure Environment Variables
Follow the JDK prompts to install the SDK. After installation, set the environment variable.
Suppose our JDK is installed on D:/jdk-1_5_0_04
Java_home = D:/jdk-1_5_0_04 (Description: installation path)
Classpath =.; % java_home %/lib/dt. jar; % java_home %/lib/tools. Jar (Note: Set classpath to pay attention to the previous.; Do not forget :))
Add % java_home %/bin to the path (Note: To run the command, Note: If there is no semicolon after the original path, change % java_home %/bin; % java_home %/bin)
Next, we can test whether the JDK installation configuration is successful.
Compile the helloworld. Java file and enter the following code:
Class helloworld
{
Public static void main (string [] ARGs)
{
System. Out. println ("Hello world! ");
}
}
After saving the file, enter javac helloworld. Java and Java helloworld. If Hello world appears on your screen! Congratulations! Your JDK has been installed successfully!
3. Install j2me_wireless_toolkit-2_2-ml-windows (wtk)
Wtk installation is simple. Follow the prompts to install it.
4. Unzip eclipse to any location and install the call plug-in between eclipse and wtk.
5. Test j2's. Run the following code in eclipse. If Hello world! appears !, Congratulations! You have successfully installed your j2_mfa platform!
Import javax. microedition. MIDlet .*;
Import javax. microedition. lcdui .*;
Public class Hello extends MIDlet
{
Private display;
Public Hello ()
{
Display = display. getdisplay (this );
}
Public void Startapp ()
{
Form F = new form ("test ");
F. append ("Hello world! ");
Display. setcurrent (f );
}
Public void pauseapp ()
{
}
Public void destroyapp (Boolean unconditional)
{
}
}