Win a copy of Kotlin in Action this week in the Kotlin forum!
programming forums Java Java JSRs Mobile Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Sheriffs:
Saloon Keepers:
Bartenders:

# Path problems.

Andreas Joelsson
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.

Christophe Verré
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.

Stan James
(instanceof Sidekick)
Ranch Hand
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.