java - Script to Change JAVA_HOME System Variable in Windows -
i of work against jdk 1.5 - have change 1.6. bit painful have manually go , change 'java_home' system variable whenever need work on project specific 1 or other (and no, eclipse doesn't play in these scenarios - trust me...i've tried.)
i'm looking registry script or windows shell script or matter means can "toggle" system variable easy run.
i've messed 'set' command, sets variable particular command instance - not globally.
thanks in advance.
edit #1: points of advise:
- use java_home variable in path variable well, way have change java_home (which used in many projects anyways [maven, ant, etc])
- write command couple batch scripts easy use
- when make change windows command session not reflect right away. must close , reopen it.
you use setx
purpose
like so:
setx /m java_home "c:\program files (x86)\java\jdk1.6.0_17"
Comments
Post a Comment