根据相应脚本建立以下cmd(bat也行)文件,并修改成你机器上的实际环境,相信会很方便你的操作,对于Java、Tomcat、Eclipse的初学者来说也可以了解大概需要设置哪些系统环境变量。
1、StartupJava.cmd设置Java环境变量的快捷方式
@Echo Off @Rem Set Java Environment Variable... @Rem Set Java Home... Set JAVA_HOME=C:Javajdk1.5.0_13 @Rem Set Path... Set PATH=%JAVA_HOME%in @Rem Set ClassPath... Set CLASSPATH=.;%JAVA_HOME%lib ools.jar;%JAVA_HOME%libdt.jar; @Rem Set Directory... cd Start
2、StartupEclipse.cmd启动Eclipse的快捷方式
@Echo Off @Rem Startup Eclipse... @Rem Set Java Home... Set JAVA_HOME=C:Javajdk1.5.0_13 @Rem Set Eclipse Home... Set Eclipse_Home=C:eclipse @Rem Set Path... Set PATH=%JAVA_HOME%in @Rem Set ClassPath... Set CLASSPATH=.;%JAVA_HOME%lib ools.jar;%JAVA_HOME%libdt.jar; @Rem Run Eclipse... Start %Eclipse_Home%eclipse.exe -Exit
3、StartupTomcat.cmd启动Tomcat的快捷方式
@Echo Off @Rem Startup Tomcat... @Rem Set Java Home... Set JAVA_HOME=C:Javajdk1.5.0_13 @Rem Set Java Path... Set PATH=%JAVA_HOME%in @Rem Set Java ClassPath... Set CLASSPATH=.;%JAVA_HOME%lib ools.jar;%JAVA_HOME%libdt.jar; @Rem Set Tomcat Home... Set CATALINA_HOME=C: omcat Set CATALINA_BASE=C: omcat @Rem Set Tomcat ClassPath... Set CLASSPATH=.;%CATALINA_HOME%libjsp-api.jar;%CATALINA_HOME%libservlet-api.jar; @Rem Run Tomcat... Call %CATALINA_HOME%instartup.bat
4、ShutdownTomcat.cmd关闭Tomcat的快捷方式
@Echo Off @Rem Shutdown Tomcat... @Rem Set Java Home... Set JAVA_HOME=C:Javajdk1.5.0_13 @Rem Set Path... Set PATH=%JAVA_HOME%in @Rem Set ClassPath... Set CLASSPATH=.;%JAVA_HOME%lib ools.jar;%JAVA_HOME%libdt.jar; @Rem Set Tomcat Home... Set CATALINA_HOME=C: omcat Set CATALINA_BASE=C: omcat @Rem Set Tomcat ClassPath... Set CLASSPATH=.;%CATALINA_HOME%libjsp-api.jar;%CATALINA_HOME%libservlet-api.jar; @Rem Run Tomcat... Call %CATALINA_HOME%inshutdown.bat