Java环境一键配置,需要手动输入jdk路劲。
Java环境一键配置,需要手动输入jdk路劲。
*****************************************************************
echo off :begin set/p jdkpath=please input your jdkpath and click enter: ECHO %jdkpath% IF EXIST %jdkpath%. goto action ELSE goto error. :error ECHO input error [ %jdkpath% ] not exist goto begin :action ECHO 1. create JAVA_HOME envirment %jdkpath% ECHO 2. set PATH envirment:add %jdkpath%\bin ECHO 3. create CLASSPATH envirment %jdkpath%\lib setx /M JAVA_HOME "%jdkpath%" setx /M CLASSPATH ".;%JAVA_HOME%\lib;%%JAVA_HOME%%\lib\dt.jar;%%JAVA_HOME%%\lib\tools.jar" setx /M PATH "%%JAVA_HOME%%\bin;%%JAVA_HOME%%\jre\bin;" ECHO OK! pause
**************************************************************