According to the corresponding script to establish the following cmd (Bat also line) file, and modify the actual environment on your machine, I believe it will be very convenient for your operation, for Java, Tomcat, Eclipse for beginners can also understand the need to set which system environment variables.
1. Startupjava.cmd setting shortcuts to Java environment variables
@Echo Off@rem set Java environment Variable ... @Rem set Java Home ... Set Java_home=c:\java\jdk1.5.0_13@rem set Path ... Set Path=%java_home%\bin@rem set ClassPath ... Set classpath=.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar; @Rem Set directory...cd Start
2. Startupeclipse.cmd Start Eclipse shortcuts
@Echo off@rem Startup Eclipse ... @Rem Set Java Home ... Set Java_home=c:\java\jdk1.5.0_13@rem set Eclipse HOME ... Set Eclipse_home=c:\eclipse@rem set Path ... Set Path=%java_home%\bin@rem set ClassPath ... Set classpath=.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar, @Rem Run Eclipse ... Start%eclipse_home%\eclipse.exe-exit
3. Startuptomcat.cmd Start Tomcat shortcuts
@Echo off@rem Startup Tomcat ... @Rem Set Java Home ... Set Java_home=c:\java\jdk1.5.0_13@rem set JAVA Path ... Set Path=%java_home%\bin@rem set JAVA ClassPath ... Set classpath=.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar; @Rem Set Tomcat HOME ... Set Catalina_home=c:\tomcatset Catalina_base=c:\tomcat@rem set Tomcat ClassPath ... Set classpath=.; %catalina_home%\lib\jsp-api.jar;%catalina_home%\lib\servlet-api.jar, @Rem Run Tomcat ... Call%catalina_home%\bin\startup.bat
4. Shutdowntomcat.cmd Close Tomcat shortcuts
@Echo off@rem Shutdown Tomcat ... @Rem Set Java Home ... Set Java_home=c:\java\jdk1.5.0_13@rem set Path ... Set Path=%java_home%\bin@rem set ClassPath ... Set classpath=.; %java_home%\lib\tools.jar;%java_home%\lib\dt.jar; @Rem Set Tomcat HOME ... Set Catalina_home=c:\tomcatset Catalina_base=c:\tomcat@rem set Tomcat ClassPath ... Set classpath=.; %catalina_home%\lib\jsp-api.jar;%catalina_home%\lib\servlet-api.jar, @Rem Run Tomcat ... Call%catalina_home%\bin\shutdown.bat
Set up batch processing of related environment variables when you start Eclipse, Tomcat