BAT Batch Settings Java JDK system environment variable file

Source: Internet
Author: User

Original: Bat Batch settings Java JDK system environment variable file


Modify the Java installation directory on line 3rd to set Java_home, ClassPath, append to the front of path

Java_home=c:\program files\java\jdk1.6.0_10

Classpath=%java_home%\lib\tools.jar;%java_home%\lib\dt.jar;.

Path=%java_home%\bin, ....... Append to the front of path (solve the problem that there should not be a semicolon at the end.) Oh. Leave the question to others

Here you can download http://download.csdn.net/detail/lpy3654321/5887509

We have questions, please leave a message


@echo Offset Regpath=hkey_local_machine\system\currentcontrolset\control\session Manager\environmentset Javahome=C : \program Files\java\jdk1.6.0_10rem Lpyecho.echo ************************************************************echo * *echo * JDK system environment variable settings *echo * *echo ********************************************************* Echo.echo = = = Ready to set environment variable: Java_home=%javahome%echo = = = Note: If java_home exists, it will be overwritten, this operation is irreversible, please check the confirmation carefully!! ===echo.echo = = = Ready to set the environment variable (there is a.): Classpath=%%java_home%%\lib\tools.jar;%%java_home%%\lib\dt.jar;. echo = = = Note: If classpath exists, it will be overwritten, this operation is irreversible, please check the confirmation carefully!! ===echo.echo = = = Ready to set environment variable: Path=%%java_home%%\binecho = = = Note: PATH will be appended to the front, echo.set/p en= please confirm and press ENTER to start setting! Echo.echo.echo.echo.echo = = = New Create environment variable Java_home=%javahome%setx "Java_home" "%javahome%"-mecho.echo.echo = = = Newly created environment variable Classpath=%%java_home%%\lib\tools.jar;%%java_home%%%\lib\dt.jar;. Setx "ClassPath" "%%java_home%%\lib\tools.jar;%%java_home%%%\lib\dt.jar;."-mecho.echo.echo = = = new APPEND environment variable (append to front) PATH =%%java_home%%\binfor/f "tokens=1,* delims=:"%%a in (' Reg QUERY '%regpath% "/V" path "') Do (set" L=%%a "Set" p=%% B ") set" y=%l:~-1%:%p% "Setx path"%%java_home%%\bin;%y% "-mecho.echo.rem lpy Zeus http://write.blog.csdn.net/postedit/ 9822439echo = = Please press any key to exit! Pause>nul

@@


BAT Batch Settings Java JDK system environment variable file

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.