aspose file tools*
The moose likes Beginning Java and the fly likes Windows - XP: SET PATH Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Windows - XP: SET PATH " Watch "Windows - XP: SET PATH " New topic
Author

Windows - XP: SET PATH

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
To set PATH and CLASSPATH on the Windows - XP,
1. There is an advice on that %PATH% is not necessary.
2. do not use trailing semicolon.
3. use lower cases.
Please kindly confirm the following:
when set path variable:
click on My Computer-->Properties-->Advanced-->Environmental Variables. Click on lower panes New button and in the text field variable: I typed PATH and in the text field of value: I typed C:\j2sdk1.4.1_02\bin;%PATH%;
Do the advices mean that in the text field of value: I should instead type
C:\j2sdk1.4.1_02\bin
And when set environmental CLASSPATH variable, I should type
C:\j2sdk1.4.1_02\lib\tools.jar;c:\j2sdk1.4.1_02\lib;c:\j2sdk1.4.1_02\servlet.jar
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
To set PATH and CLASSPATH on the Windows - XP,
1. There is an advice on that %PATH% is not necessary.
2. do not use trailing semicolon.
3. use lower cases.

1 and 2 sound ok, but if a JAR file name has capitalization, I'd include it in the CLASSPATH setting.
when set path variable... I typed PATH and in the text field of value: I typed C:\j2sdk1.4.1_02\bin;%PATH%;[i]
Sounds ok. You probably don't need the trailing semicolon, but I'm not aware that it hurts either.
[i]Do the advices mean that in the text field of value: I should instead type
C:\j2sdk1.4.1_02\bin

I would guess that this would have the same effect as your previous setting.
And when set environmental CLASSPATH variable, I should type
C:\j2sdk1.4.1_02\lib\tools.jar;c:\j2sdk1.4.1_02\lib;c:\j2sdk1.4.1_02\servlet.jar

Including the lib folder isn't necessary, as it doesn't usually include any class files.
I would include a dot to indicate the current directory. I would also include the rt.jar file of the JRE installation. Sun's J2SDK and JRE installations automatically find this library, but other tools (such as jikes) don't.
Of course, you probably don't need to include anything that isn't used. Does something you use actually need tools.jar in the CLASSPATH?
Here's my CLASSPATH setting on Windows XP:
.;G:\java\j2sdk1.4.1_02\jre\lib\rt.jar;G:\java\j2sdkee1.3.1\lib\j2ee.jar;G:\java\JavaRanch\JavaRanchCommon.jar
and here's my PATH setting:
G:\Program Files\Java\j2re1.4.1\bin;G:\java\j2sdk1.4.1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
Notice I list Sun's JRE first in the PATH setting so that Microsoft's old java.exe in the Windows system folders doesn't interfere.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Windows - XP: SET PATH