I’m switching between different Java SDKs (1.4.2, 1.5.0 and 1.6.0) for various projects. I would like to set the JAVA_HOME environment variable on my Windows XP machine without going through the tedious My Computer -> Advanced -> [Select System Variable] -> Edit -> Ok -> Ok
Is it possible to do this from the command line, or is there a utility that can do this?
(Note that I am not referring to the standard batch file ‘SET’ command – I want to set the environment variable ‘globally,’ not just for the life of a console window).
From http://vlaurie.com/computers2/Articles/environment.htm: