| Environment Variables:
|
DOS Environments:
View the DOS Environment Variables.
- c:\> set | more
- This DOS command will show you all of the DOS environment
variables and page break if neccessary.
Changing the DOS Environment Variables.
- set CLASSPATH=. - This
sets the class path to the current directory. Make sure you
don't add extra spaces to this command!
- set
CLASSPATH= - This
will remove the CLASSPATH variable.
DOS Variables: path & CLASSPATH
- path - shows the director order in which DOS will
look for DOS Commands. I like to have the JDK be the first in
the list if your OS allows it. (ex: c:\jdk1.3\bin;
c:\winnt; etc...)
- CLASSPATH - a variable that tells java which
directories to look for classes. You should have ".;" be the
first in the list. If you need to customize the CLASSPATH for
a program use the -classpath compile option when compiling (ex: javac
HelloWorld.java -classpath . ).
General Notes - Environment Variables:
- User Variables Section
Note: Because some software programs create errors when
installing, I always change the setttings for "temp" and "tmp".
From: %USERPROFILE%\Local Settings\Temp
To: c:\temp (make sure the directory exits)
Win XP
- Start, Settings, Control Panel, System
- Click the tab "Advanced", then click "Environment
Variables"
WinNT (NT4.0 & NT2000)
- Start, Settings, Control Panel, System, Environment
- Next Click on the "System Variable" called "Path".
- Next modify the "value" field by putting the path at
the end of the current value. (Separate the paths with a ";").
Ex: ....; c:\jdk1.3\bin
Win 95/98
- Steps
- Press Start, Run
- type: msconfig
- Then hit the "Enter" key.
- Click on the Autoexec.bat tab
- Click on "set Path" line. Then click
"Edit"
- Right now you are viewing the Autoexec.bat
file. Be careful while you are in this file.
- See if you have a command that begins with
"SET PATH =". If you do, add the correct path as the first
entry after the "SET PATH =". Choose from the following:
- For JDK 1.2 add: c:\jdk1.2\bin;
- For SDK 1.3 add: c:\jdk1.3\bin;
Note: If you don't have a "SET PATH" statement, add the following:
- set path = c:\jdk1.3\bin;
- Next, you must reboot.
- After you reboot go to a DOS prompt and type:
path
- If c:\jdk1.3\bin appears first your are
completed. If c:\windows and/or c:\windows\command is first,
you maybe calling java.exe from those directories.
Win ME
- Steps
- Press Start, Run
- type: msconfig
- Then hit the "Enter" key.
- Click on the Environment tab
- Click on "Path" line. Then click "Edit"
- Be careful and add the correct path.
Note - add the path as the first entry.
For JDK 1.2 add: c:\jdk1.2\bin;
For SDK 1.3 add: c:\jdk1.3\bin;
Ex: c:\jdk1.3\bin; c:\windows; c:\windows\command;
- Click on "Apply"
- Now click on the "General" tab. Make
sure that the Normal option is selected. If not you may get a
message about "selective startup" after you reboot.
- Click on "OK"
- Next, you must reboot.
- After you reboot go to a DOS prompt and type:
path
- If c:\jdk1.3\bin appears first your are
completed. If c:\windows and/or c:\windows\command is first,
you maybe calling java.exe from those directories.
|