myeclipse运行tomcat自动运行debug模式

myeclipse中关闭tomcat时报错

二月 26, 2015 4:49:56 下午 org.apache.catalina.startup.Catalina stopServer
严重: Could not contact localhost:8005. Tomcat may not be running.
二月 26, 2015 4:49:56 下午 org.apache.catalina.startup.Catalina stopServer
严重: Catalina.stop: 
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:450)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:400)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:487)
而且tomcat服务器关闭不了

将你的服务器启动方式设置为run方式,不要设置为debug方式。 
具体采用的方法: 
如下: 
window->preferences  然后找到你的tomcat所在的目录,打开launch窗口,然后修改tomcat lanuch mode为Run mode。然后点击Apply,最后点击OK. 
这样设置之后,以后服务器就是在run mode下运行了 
如果你不这样设置,那就在每次启动的时候,选择run server,而不是debug server. 

你可能感兴趣的:(自动运行,debug模式,修改模式)