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 Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where do I update the PATH environment?

 
David Hernandez
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded what I believe is the J2SE 5.0 from SUN, it installed it in "C:\Program Files\Java\jdk1.5.0_22\", within it, there is a folder called “\bin". Now, the book says "Your need to add an entry to your PATH environment variable that points to the "\bin" directory inside the main Java directory. The" \bin" directory is the one you need a path to so when you type "% javac" at the command line, your terminal will know how to find the javac compiler".

Under "System Properties", "Advance" tab, there ar two groups, the "User Variables" and the "Sys Variables", I guess I could edit the variable PATH variable within the "Sys variables" group, which has the following content :
"%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\" but I am not sure what to edit it to and if I am in the right spot.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess I could edit the variable PATH variable within the "Sys variables" group

Yes. You can also set JAVA_HOME there.

JAVA_HOME = C:\Program Files\Java\jdk1.5.0_22
PATH = "%JAVA_HOME%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\"
 
David Hernandez
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Christophe Verré wrote:
I guess I could edit the variable PATH variable within the "Sys variables" group

Yes. You can also set JAVA_HOME there.

1) JAVA_HOME = C:\Program Files\Java\jdk1.5.0_22

You mean I create a new variable in the "System Variable" group, name it JAVA_Home and the variable value to be C:\Program Files\Java\jdk1.5.0_22?

2)PATH = "%JAVA_HOME%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\"

You mean I edit the Path variable within the "System Variable" group, add "%JAVA_HOME%\bin;" right before %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\"?

Thanks.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean I create a new variable in the "System Variable" group, name it JAVA_Home and the variable value to be C:\Program Files\Java\jdk1.5.0_22?

Yes.

You mean I edit the Path variable within the "System Variable" group, add "%JAVA_HOME%\bin;" right before %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\"?

That's right. Sorry for the confusion.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic