"Development environment" JAVA Environment Variables batch processing

Source: Internet
Author: User

@echo offSetRegpath=hkey_local_machine\system\currentcontrolset\control\session Manager\EnvironmentSetJavahome=D:\Java\jdk1.7.0_40Echo.Echo ************************************************************Echo *                                                          *Echo* JDK System environment variable setting *Echo *                                                          *Echo ************************************************************Echo.Echo# Prepare to set environment variable: java_home=%javahome%Echo# Note: If Java_home exists, it will be overwritten, this action is irreversible,Please check the confirmation carefully!Echo.Echo# Prepare to set environment variables (there is a.): Classpath=%%java_home%%\lib\tools.jar;%%java_home%%\lib\dt.jar;.Echo# Note: If classpath exists, it will be overwritten, this action is irreversible,Please check the confirmation carefully!Echo.Echo# Prepare to set environment variables:PATH=%%java_home%%\binEcho# Note: path is 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%%\bin for/F "tokens=1,* delims=:"%%a in (' Reg QUERY '%regpath% "/V" path ") Do(Set"L=%%a"Set"P=%%b")Set"y=%l:~-1%:%p%"setxPath"%%java_home%%\bin;%y%"- MEcho.Echo.EchoPlease press any key to exit ...Pause>nul

"Development environment" JAVA Environment Variables batch processing

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.