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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Ron McLeod
• Paul Clapham
• Bear Bibeault
• Junilu Lacar
Sheriffs:
• Jeanne Boyarsky
• Tim Cooke
• Henry Wong
Saloon Keepers:
• Tim Moores
• Stephan van Hulst
• Tim Holloway
• salvin francis
• Frits Walraven
Bartenders:
• Scott Selikoff
• Piet Souris
• Carey Brown

# Path problems.

Greenhorn
Posts: 3
Well I have been trying to add a path to environment variables so I dont have to make it manually every time I restart the computer. I am running windows XP and under environent variables I have a avariable called Java pointing to C:\Program Files\Java\jdk1.5.0_08\bin under system variables. Now to make it easy I have all my progams under c:\java\Program\ and well I have to go to this path in command prompt and do a path C:\Program Files\Java\jdk1.5.0_08\bin to even be able to compile. I can however run the programs but i guess that is due to having JRe installed.

Sheriff
Posts: 14691
16

I have a avariable called Java pointing to C:\Program Files\Java\jdk1.5.0_08\bin

It should be called JAVA_HOME, and should point to C:\Program Files\Java\jdk1.5.0_08
There should be another variable called Path. Add %JAVA_HOME%\bin to it.

(instanceof Sidekick)
Posts: 8791
I have multiple JDKs and made some batch files to do the PATH command very much the way you were typing it. That's not as seamless as setting it in the environment, but better than typing complex paths. Here's a sample:

At different times I've had other things in here, too, such as CLASSPATH and variables for other products.