One-click installation and configuration of the Java environment

OFF @echo

echo **********************************************
echo.
echo Welcome joymo.cc a key to install the JDK
echo.
echo *********************************** ***********

echo.
echo being installed jdk, do not perform other operations
echo.
echo Please wait, it takes about a few minutes
echo.
for / R %% S in (the JDK * .exe) Start do / S %% the WAIT / Qn INSTALLDIR = D: \ the Java \ JDK
echo JDK installed

SET the JAVA_HOME = D: \ the Java \ JDK
SET% = the PATH the PATH%; %% %% the JAVA_HOME \ bin; %% %% the JAVA_HOME \ JRE \ bin
SET the CLASSPATH =;. %% %% the JAVA_HOME \ lib \ Dt.jar; %% %% the JAVA_HOME \ lib \ the tools.jar; %% %% the JAVA_HOME \ JRE \ lib

SET = RegV the HKLM \ the SYSTEM \ CurrentControlSet \ Control \ the Session Manager \ Environment

REG the Add "% RegV%" / V "the JAVA_HOME" / D "the JAVA_HOME%%" / F
reg add "%RegV%" /v "Path" /t REG_EXPAND_SZ /d "%PATH%" /f
reg add "%RegV%" /v "CLASSPATH" /d "%CLASSPATH%" /f
mshta vbscript:msgbox("Java环境已成功注册!",64,"成功")(window.close)

Guess you like

Origin www.cnblogs.com/hooli/p/11791311.html