Background introduction:
Originally installed MyEclipse 8.5 is 32-bit, the previous time began to learn Android development, made a Adt-bundle 64-bit, often need to change the Java version, so wrote two bat files to modify Java_home
BAT Content
@echo off&setlocal enabledelayedexpansion&title Change java_home environment variable color 0aclsecho==== =======================================================echo========== ==========echo====== ==== changing java_home environment variables ==========echo========== @Author Program Ape Pay ==========echo========== @Date 2014-11-11 11:11:11 ==========echo========== ==========echo========== 1:32 bit jdk 2:64 bit jdk ==========echo========== ==========echo===========================================================:startecho Please enter the corresponding serial number .........set /p input=echo !input!if !input! == 1 setx java_home "c:\\program files (x86) \\Java\\jdk1.6.0_45" /Mif !input! == 2 SETX java_home "C:\\program files\\java\\jdk1.7.0_51" /mgoto startpause
Note: You need to run with administrator privileges.
Windows BAT File Settings java_home environment variables