add_jre.bat
::添加环境变量JAVA_HOME @echo off echo 添加java环境变量 set regpath=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment set evname=JAVA_HOME set javapath=C:\jre1.8.0_101_32reg add "%regpath%" /v %evname% /d %javapath% /f pause>nul
mod_path.bat
wmic environment where "name=‘PATH‘ and username=‘<system>‘" set VariableValue="%PATH%;%JAVA_HOME%bin"
时间: 2024-10-02 10:07:40