简体   繁体   中英

Tomcat Server Not Starting from Eclipse Oxygen in Mac

I added tomcat 8 and 9 both in my eclipse oxygen and tried to run Spring based Web Application on the tomcat server but its giving error in console:

Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit

In popup it gives the error:

'Server Tomcat v9.0 Server at localhost' has encountered a problem Server Tomcat v9.0 Server at localhost failed to start.

How to fix this?

Please do a "ping localhost" on a terminal. if it is responding something like

ping: cannot resolve localhost: Unknown host

Chances are you don't have "127.0.0.1 localhost" line in your hosts file (/etc/hosts). So, just add it there. Sometimes the line is there but it is still not working. The issue can be with the "Line Endings" on /etc/hosts file. Check it using Sublime (View/Line Endings). If it is set to "Mac OS" just change it to "Unix". After do this, try again to ping localhost. If it is going as expected just try again Running/Debugging on Server in Eclipse.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM