Java Reference
In-Depth Information
If you get a "command or file name not found" error message, the PATH environment variable
probably is not set correctly. Include the bin directory of the KVM installation in your system
search path.
Now perform the same test for the javac command:
C:\> javac
Again, if the system returns a "command or file name not found" error message, ensure that a JDK
is installed and also that the JDK bin directory is in the system search path, as described in the
previous section.
Now that you are sure your system is set up properly, you're ready for real programming. You can
go directly to the subsection of the target profile for which you are planning to program, or you
can go through all three if you want to get an overview of the profiles.
CLDC KVM Reference Implementation
Begin by setting an environment variable that points to the CLDC and Kjava classes:
Windows:
set CLDC_BCP=c:\j2me_cldc \bin \common \api \classes
Unix/Csh:
setenv CLDC_BCP ~/j2me_cldc/bin/common/api/classes
Unix/Bash:
export CLDC_BCP=~/j2me_cldc/bin/common/api/classes
Note that the actual directory containing the CLDC and Kjava classes depends on the exact
installation and version number; it may differ from this example. If so, set the CLDC_BCP variable
accordingly.
On Windows 98, you can add the previous line to the file c:\autoexec.bat . On Unix systems,
add the line to the corresponding startup or login script. The changes will then affect all command
lines automatically. If you're running Windows NT 4.0 or Windows 2000 Professional, the system
environment variables are set in the same place as the system search path. Open the system
properties dialog by right-clicking My Computer on your desktop and selecting Properties. Then,
choose the Extended tab and select Environment Variables to set the CLDC_BCP variable
permanently. Select New for User Variables to open a dialog box in which you can set the name
(for example, CLDC_BCP ) and the value ( c:\j2me_cldc\bin\api\classes ) of the variable.
When you click OK, the new variable will be stored permanently and will be available in all new
command shells. Shells already started are not affected, so they must be closed and restarted.
Finally, check whether the environment variable pointing to the CLDC and Kjava classes is set
properly:
echo %CLDC_BCP%
Windows:
echo $CLDC_BCP
Unix:
Search WWH ::




Custom Search