aspose file tools*
The moose likes Beginning Java and the fly likes Where do I update the PATH environment? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Where do I update the PATH environment?" Watch "Where do I update the PATH environment?" New topic
Author

Where do I update the PATH environment?

David Hernandez
Greenhorn

Joined: Jun 06, 2010
Posts: 13
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

Joined: Nov 24, 2005
Posts: 14688
    
  16

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\"


[My Blog]
All roads lead to JavaRanch
David Hernandez
Greenhorn

Joined: Jun 06, 2010
Posts: 13
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

Joined: Nov 24, 2005
Posts: 14688
    
  16

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.
 
wood burning stoves
 
subject: Where do I update the PATH environment?