标签:注册 close tools echo bin 需要 star class jdk安装
@echo off
echo **********************************************
echo.
echo 欢迎使用joymo.cc一键安装jdk
echo.
echo **********************************************
echo.
echo 正在安装jdk,请不要执行其他操作
echo.
echo 请稍等,这大约需要几分钟
echo.
for /R %%s in (jdk*.exe) do start /WAIT %%s /qn INSTALLDIR=D:\Java\jdk
echo jdk安装完毕
set JAVA_HOME=D:\Java\jdk
set PATH=%PATH%;%%JAVA_HOME%%\bin;%%JAVA_HOME%%\jre\bin
set CLASSPATH=.;%%JAVA_HOME%%\lib\dt.jar;%%JAVA_HOME%%\lib\tools.jar;%%JAVA_HOME%%\jre\lib
set RegV=HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
reg add "%RegV%" /v "JAVA_HOME" /d "%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)
标签:注册 close tools echo bin 需要 star class jdk安装
原文地址:https://www.cnblogs.com/hooli/p/11791311.html