In the second half of last year, the company decided to invest manpower and material resources to "follow the trend" in research on big data and apply it to subsequent projects. Therefore, we must be familiar with Java.
Let’s get a JavaEE development environment first. Install JDK and JRE. In fact, there is already JRE under JDK. If it is on the server, just install JRE; and then configure the environment variables:
New: JAVA_HOME: D:/Java/jdk1.7.0_51
New: CLASS_PATH:.;%JAVA_HOME%/lib
Edit: PATH: Add %JAVA_HOME%/bin at the front; then install Tomcat, startup.bat, shutdown.bat are normal, and then you want to make the compressed version of Tomcat start and shut down into a Windows service to handle it and execute service. Bat install prompts that the service was created successfully, but the service was started failed. The system log prompts:
I used to have no problem with the Windows 2003 system on my desktop, but why is it like this now on the Windows 7 system notebook? Let’s analyze first. Since service.bat can be called normally, there is no problem with the configuration of environment variables. Compared with the following two operating systems, it seems that the most likely thing is the permissions during installation. First uninstall the installed service service.bat remove, then "run as administrator" cmd.exe, switch to the directory where service.bat is located to execute service.bat install and reinstall the Tomcat service. HoHo, now it can be started and closed normally.
Because it is a development environment, we can configure a super user admin to enable it to manage Tomcat through "http://localhost:8080/". Enter the conf folder in the root directory of Tomcat, open "tomcat-users.xml" to edit:
The code copy is as follows:
<tomcat-users>
<user username="admin" password="admin" roles="manager-gui,admin-gui"/>
</tomcat-users>
After restarting Tomcat, you can use admin to manage Tomcat.