Build the Tomact Runtime Environment
The Tomcat server is a free open-source Web application server, which is a lightweight application server. It is widely used in small and medium systems and concurrent users, is the first choice for developing and debugging JSP programs. -- Baidu encyclopedia
Therefore, our small projects must be able to run in the Tomact environment, but when you manually click the startup item, it is just a flash:
Later, I found out that Tomact is a lightweight container, which belongs to a third-party software. Although it is easy to use, it still takes effect in the Java environment and runs startup in the dos window. bat, JAVA_HOME is missing, as shown in the figure below:
JAVA_HOME points to the JDK installation path. For example, my installation path is "C: \ Program Files \ Java \ jdk1.8.0 _ 51 ", then I only need to set the Java_HOME value to this path, as shown in the figure below:
In this way, the Java environment is successfully set up and the running effect is as follows:
Of course, the purpose of setting environment variables is to let them find the JDK path. We can also directly write this sentence in Startup. bat:
The advantage of setting environment variables is that the Java environment can take effect as long as it is required. If it is written to the Code, the only benefit is tomact! No matter what method is used, you only need to find the JDK, so that it can run successfully.