• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Where do I update the PATH environment?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic