@echo off @rem if "%java_home%"=="c:\program files\java\jdk1.6.0" goto normal @rem 获取当前路径 set currentpath=%cd% @rem managetools替换为java set path=%currentpath:managetools=java% set java_home=\jdk1.6.0 set java_home=%path%%java_home% set java_jre=\jre1.6.0 set java_jre=%path%%java_jre% set classpath="%java_home%\bin;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar; set path=%java_home%\bin start reg add "hkey_local_machine\system\controlset001\control\session manager\environment" /v "JAVA_HOME" /t reg_sz /d %java_home% /f start reg add "hkey_local_machine\system\controlset001\control\session manager\environment" /v "JAVA_JRE" /t reg_sz /d %java_jre% /f start reg add "hkey_local_machine\system\controlset001\control\session manager\environment" /v "CLASSPATH" /t reg_sz /d %classpath% /f start reg add "hkey_local_machine\system\controlset001\control\session manager\environment" /v "PATH" /t reg_sz /d %path% /f @echo on java -xms250m -xmx750m -classpath %classpath% com.sihitech.fileup.server.startserver exit