Installing Java SDK

Appendix A: Installing Java SDK

You need JavaTM 2 SDK, Standard Edition (J2SE SDK), version 1.4.2 or higher. The JavaTM 2, Standard Edition Runtime Environment (JRE), version 1.4.2 can suffice if you only plan to run the demonstration applications. But we are not here to watch demos, let’s develop our own apps.

Go to and download a version accordingly.

Install it, just run the setup file.

I installed J2SE 5.0, which was installed by default in C:\Program Files\Java\jdk1.5.0_04 in Windows 2000. You can change the default location but remember where you install it.

Now change the system path variable so that you can use the java commands (‘javac’ or ‘java’) in the command prompt directly. I will show you how to do this in Windows 2000.

However while using the wireless toolkit for J2ME development, we won’t be using direct command-line interface. So in case it looks cumbersome, the following steps of setting PATH variable can be skipped.

Just install the java SDK at a suitable location and remember the location.

To change the system path variable (Windows) -

  1. Right click on ‘My Computer’
  2. Select ‘Properties’
  3. In the properties window select ‘advanced’ tab

  4. Click on ‘Environment Variables’ button
  5. Create ‘PATH’ variable if not already present by clicking new / If already present edit the ‘PATH’ variable
  6. Add the path of ‘C:\Program Files\Java\jdk1.5.0_04\bin’ (Remember to use the actual path you used for the recent java installation and in the PATH variable separate entries with a semi-colon)
  7. Now open a command window (you can do it by typing ‘cmd’ in ‘Run’ of ‘Start Menu’) & type in the command ‘java –version’ (note there is a space after java). The output should be something like “java version "1.5.0_04"” (the version might be different in your case)
    If you get a message saying ‘unknown command’ or showing a wrong java version, recheck the PATH setting as described in the previous step
  8. If the problem is not solved, don’t worry. You can always use the complete path e.g. “C:\Program Files\Java\jdk1.5.0_04\bin\java” –version.