JDK configuration and Tomcat configuration

JDK environment variable configuration
If you are compiling the java source file, javac helloworld.java is not an internal command, that is, the JDK
download URL is not installed : add a link description
and it will do after the download is complete.
The following tasks are configuration:
a. Create a new JAVA_HOME environment variable. JAVA_HOME=C:\Java\jdk1.8.0_144 (the location where you install jdk: pay attention to this place not to write \bin to your installation directory)

b. Modify the Path environment variable and add %JAVA_HOME%\bin at the end of the path variable

c. Create a new classpath environment variable, classpath=.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\tools.jar

Note: (jdk needs to configure three environment variables; after 1.5, the classpath can no longer be set, but it is recommended to keep the classpath setting)
Download Tomcat: add link description
Look at his directory:
bin is dedicated to storing the executable program
conf of the Tomcat server Used to store the configuration file
lib of the Tocmat server. It is used to store the jar package
logs of the Tomcat server. It is used to store the diary information output by the Tomcat server.
temp. It is used to store the temporary data generated by Tomcdat. The
webapps are used to store the deployment. Web project.
work is the working directory of Tomcat, which is used to store the source code of jsp translated into Servlet when Tomcat is running, and the directory of Session passivation.
Startup: 1: Find the startup.bat file in the bin directory of the Tomcat directory, and double-click it to start the Tomcat server
2:
1. Open the command line 2. cd to the bin directory of your Tomcat 3. Type the startup command: Catalina run to
close: 1. Click the x close button
in the tomcat server window 2. Set the Tomcat server window as the current window, and then press the shortcut key Ctrl+C
3. Find the shutdown.bat in the bin directory of Tomcat and double-click to stop Tomcat The server
chooses the version you need, but
Insert picture description hereyour own version must correspond to the picture below. How to test it?
URL input: http://localhost:8080
a local page appears Insert picture description here
This is the configuration!
If you want to configure the server port, please see the picture below.
Insert picture description here
Thank you for watching!

Guess you like

Origin blog.csdn.net/qq_42678668/article/details/105509864