This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Windows - XP: SET PATH

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic