1. Install JDK
After JDK is installed, configure the JDK environment variables:
Right-click "my computer" and choose "properties"> "advanced"> "environment variable (n )".
Create a system variable java_home: C: \ Program Files \ Java \ jdk1.6.0 _ 10
New system variable classpath: % java_home %/LIB;
Add the following content before the path value of the system variable: % java_home %/bin; (remember to separate it from other environment variables with the; sign)
Here, JDK installation is complete.
2. install Tomcat
After Tomcat is installed, configure the Tomcat environment variable:
Right-click "my computer" and choose "properties"> "advanced"> "environment variable (n )".
Create a system variable tomcat_home: e: \ JSP \ apache-Tomcat-6.0.36
Add % tomact_home %/lib to the value of the system variable classpath;
Add the following content to the path value of the system variable "% java_home %/bin;": % tomact_home %/bin;
At this point, tomcat installation is complete.
//////////////////////////////////////// /// // Test JDK /////////////////////////////////////// //////////////////////////////////////// /////////////////////
Open cmd to test whether JDK configuration is successful:
Enter the command: Java
Output the following information:
C: \ Documents ents and Settings \ Administrator> JAVA
Usage: Java [-options] class [ARGs...]
(To execute a class)
Or Java [-options]-jar jarfile [ARGs...]
(To execute a jar file)
Where options include:
-Client to select the "client" VM
-Server to select the "server" VM
-Hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-CP <Class search path of directories and zip/jar files>
-Classpath <Class search path of directories and zip/jar files>
A; separated list of directories, Jar archives,
And zip archives to search for class files.
-D <name >=< value>
Set a system property
-Verbose [: Class | GC | JNI]
Enable verbose output
-Version print product version and exit
-Version: <value>
Require the specified version to run
-Showversion print product version and continue
-JRE-restrict-search |-JRE-no-restrict-Search
Include/exclude user private jres in the version search
-? -Help print this help message
-X print help on non-standard options
-Ea [: <packagename>... |: <classname>]
-Enableassertions [: <packagename>... |: <classname>]
Enable assertions
-Da [: <packagename>... |: <classname>]
-Disableassertions [: <packagename>... |: <classname>]
Disable assertions
-ESA |-enablesystemassertions
Enable System assertions
-DSA |-disablesystemassertions
Disable system assertions
-Agentlib: <libname> [= <Options>]
Load native agent library <libname>, e.g.-agentlib: hprof
See also,-agentlib: jdwp = help and-agentlib: hprof = Help
-Agentpath: <pathname> [= <Options>]
Load native agent library by full pathname
-Javaagent: <jarpath> [= <Options>]
Load Java programming language agent, see java. Lang. Instrument
-Splash: <ImagePath>
Show splash screen with specified Image
Run javac.
Output the following information:
C: \ Documents ents and Settings \ Administrator> javac
Usage: javac <option> <Source File>
Possible options include:
-G generates all debugging information
-G: None does not generate any debugging information
-G: {lines, vars, source} only generates some debugging information
-Nowarn does not generate any warning
-Verbose outputs messages about the operations being performed by the compiler.
-Deprecation: output the source location of an outdated API
-Classpath <path> specifies the location for searching user class files and annotation handlers.
-CP <path> specifies the location for searching user class files and annotation handlers
-Sourcepath <path> specifies the location of the Input Source file to be searched.
-Bootclasspath <path> overwrites the position of the boot class file
-Extdirs <directory> overwrites the location of the installed extension directory.
-Endorseddirs <directory> overwrites the location of the standard path of the signature.
-Proc: {none, only} controls whether to perform annotation processing and/or compilation.
-Processor <class1> [, <class2>, <class3>...] Name of the annotation handler to be run; bypass the default
Search Process
-Processorpath <path> specifies the location of the comment handler.
-D <directory> specifies the location where the generated class files are stored.
-S <directory> specifies the location where the generated source file is stored
-Implicit: {none, class} specifies whether to generate class files for implicitly referenced files
-Encoding <encoding> specifies the character encoding used by the source file.
-Source <version> provides source compatibility with the specified version.
-Target <version> generates class files of a specific VM version.
-Version Version Information
-Help: output the summary of standard options.
-Akey [= value] Options passed to the annotation Handler
-X outputs a feed of non-standard options
-J <flag> directly transmits the <flag> to the runtime system
//////////////////////////////////////// /////////// Test whether Tomcat is configured successfully ///////////////////// ///////////////////////////////////
Go to the bin in the Tomcat directory.
Double-click STARTUP. bat
If the following information is displayed, the configuration is successful:
2012-11-27 11:36:07 org. Apache. Catalina. Core. aprlifecyclelistener init
Information: loaded APR based Apache Tomcat native library 1.1.23 using APR version 1.4
. 6.
2012-11-27 11:36:07 org. Apache. Catalina. Core. aprlifecyclelistener init
Information: Apr capabilities: ipv6 [True], sendfile [True], accept filters [false], RA
Ndom [True].
2012-11-27 11:36:07 org. Apache. Catalina. Core. aprlifecyclelistener initializessl
Information: OpenSSL successfully initialized with version OpenSSL 1.0.0g 18 Jan 2012
2012-11-27 11:36:07 org. Apache. Coyote. http11.http11aprprotocol init
Information: initializing coyote HTTP/1.1 on http-8080
2012-11-27 11:36:07 org. Apache. Coyote. AJP. ajpaprprotocol init
Information: initializing coyote AJP/1.3 on ajp-8009
2012-11-27 11:36:07 org. Apache. Catalina. startup. Catalina Load
Information: initialization processed in 438 MS
2012-11-27 11:36:07 org. Apache. Catalina. Core. standardservice start
Information: starting service Catalina
2012-11-27 11:36:07 org. Apache. Catalina. Core. standardengine start
Information: Starting Servlet Engine: Apache Tomcat/6.0.36
2012-11-27 11:36:07 org. Apache. Catalina. startup. hostconfig deploydescriptor
Information: deploying configuration descriptor host-manager.xml
2012-11-27 11:36:07 org. Apache. Catalina. startup. hostconfig deploydescriptor
Information: deploying configuration descriptor manager. xml
2012-11-27 11:36:07 org. Apache. Catalina. startup. hostconfig deploydirectory
Information: deploying web application directory docs
2012-11-27 11:36:07 org. Apache. Catalina. startup. hostconfig deploydirectory
Information: deploying web application directory examples
2012-11-27 11:36:07 org. Apache. Catalina. startup. hostconfig deploydirectory
Information: deploying web application directory Root
2012-11-27 11:36:07 org. Apache. Coyote. http11.http11aprprotocol start
Information: Starting coyote HTTP/1.1 on http-8080
2012-11-27 11:36:07 org. Apache. Coyote. AJP. ajpaprprotocol start
Information: Starting coyote AJP/1.3 on ajp-8009
2012-11-27 11:36:07 org. Apache. Catalina. startup. Catalina start
Information: server startup in 317 MS