A colleague ran a problem with Tomcat yesterday, the normal way to run Tomcat can start, but when you start in Eclipse, the following error occurs:
2008-4-17 16:04:39 Org.apache.coyote.http11.Http11Protocol Init
Serious: Error Initializing Endpoint
Java.net.SocketException:Permission Denied:listen failed
At Java.net.PlainSocketImpl.socketListen (Native method)
At Java.net.PlainSocketImpl.listen (plainsocketimpl.java:374)
At Java.net.ServerSocket.bind (serversocket.java:320)
At Java.net.serversocket.<init> (serversocket.java:185)
At Java.net.serversocket.<init> (serversocket.java:141)
You can determine that the configuration of Tomcat in Eclipse is correct.
After the uninstall (tomcat,myeclipse) operation, or not, after looking up information on the Internet, found that there may be related to the firewall,
Sure enough to shut down the firewall (Skynet) after all normal.
Another: Settings for Java environment variables
Classpath: Mainly points to some compiler tools, you can set the following: Classpath=%java_home%/jre/lib/rt.jar;%java_home%/lib/tools.jar; Note that you can add the current directory to the CLASSPATH, ".;", Classpath=./;%java_home%/jre/lib/rt.jar; This is to tell the JDK, search the class first look at the current directory of the class file-Why do this, this is due to Linux security mechanism, Linux users understand that Windows users are very difficult to understand (because Windows default search order is to search the current directory , then search the system directory, and then search the PATH environment variable set.
Path: Point to the JDK Bin directory so that you do not need to type a large string of paths when compiling and executing programs under the console. Add%java_home%/bin to the original path content;
Java_home: Point to JDK installation directory, such as:c:/jdk_1.4.2; Note: The following can not be separated by semicolons, if you add a semicolon, tomcat and so on does not start properly (run Startup.bat error).
% percent of the content
is to reference the environment variable set in the previous step java_home, you can write x:/jdk_1.4.2 is also OK; You can open a console window and enter echo%java_home% to see your setup results: