Tomcat does not start properly in eclipse

Source: Internet
Author: User

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:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.