Windows BAT File Settings java_home environment variables

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.