javalauncherbat.zip 4kb
这个脚本执行后判断 java_home 是不是有效, 如果找不到的话就打开帮助页面指导用户下载, 安装, 设置 jdk.
脚本流程如下(参考tomcat的脚本,一些路径可能需要修改)
@echo off
set java_home=../../jdk1.5.0
rem store the startup dir
set cur_dir=%cd%
cd ../../apache-tomcat-5.5.20/bin
rem using user's own java_home
if not "%java_home%" == "" goto gothome
rem setting relatived path as java_home
set java_home=../../jdk1.5.0
:gothome
if exist "%java_home%/bin/java.exe" goto okexec
start %cur_dir%/no_java.htm
goto end
:okexec
startup.bat
:end
闽公网安备 35060202000074号