Windows cannot find the file xxxx\bin\startup.bat and tomcat cannot start.

Problem symptoms:

Problem background: This is a crazy problem. Tomcat was started at first, but my network could not be connected. Then I checked and found that there were no problems with the network adapter and network cable connection, so I followed my usual method of handling it: restart the computer, and the result Something went wrong when I started it up again. It actually prompted me that the startup.bat could not be found, but it was obvious that the file existed in the path! ! !​ 

At this time, starting through Tomcat8w.exe is also unsuccessful.

After checking, these jdk environment variables are all the same as before and have not changed.

Finally found this thingRight click and run as administrator

Then he can start! ! ! ! !

Discussed with colleagues: Something changed in the computer system after I restarted this time, which required me to run startup.bat as an administrator. But what has changed! ! !

In short:When an error is reported, try to run it as an administrator! ! !

The above problem was later found to be due to a problem with system environment variables, because environment variables were previously added to the current user:

Proved by practice:After deleting this environment variable, you will not get an error again by double-clicking it.

Guess you like

Origin blog.csdn.net/yeyuningzi/article/details/134393813