I'm currently developing in 3 different Java versions and therefore often change my JAVA_HOME variable. However, I have to log out in order to get the variable updated. I update it via System Properties -> Advanced -> Environment Variables (Windows XP).
Surely there is a smarter/easier way of doing this.
I guess I could use the SET command in prompt, but that is not permanent and as I often use one Java version for a period of time I don't want to reset it every time I start the PC.
Any suggestions?
You don't have to log out to get an environment variable to stick, but you do have to restart whatever processes you're interested in. So for example, if you're using the command prompt, you will need to kill the command prompt and start a new one.
You could create 3 .bat files, each setting the JAVA_HOME variable and then starting your Development Environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With