Apache Tomcat 9.x与Eclipse及Java 10.0.1启动兼容问题求助
Hey there, let’s work through this Tomcat-Eclipse startup problem together. I’ve run into similar hiccups with older Eclipse versions paired with newer JDK/Tomcat releases, so here are actionable steps to get your server running smoothly in Eclipse:
1. Verify Tomcat Server's JRE Configuration in Eclipse
- Open Eclipse and navigate to Window > Show View > Servers (if you don’t see it, enable it via
Window > Show View > Other > Server > Servers). - Right-click your Tomcat 9.0 instance and select Open.
- Under the Server Locations section, make sure you’ve selected Use Tomcat installation (this ensures Eclipse uses your pre-installed Tomcat rather than a workspace copy, avoiding configuration mismatches).
- Scroll down to the JRE section and confirm you’ve selected your JDK 10.0.1 (not just the JRE—Tomcat relies on JDK tools like
tools.jarwhich aren’t present in a standalone JRE). - Save the configuration, restart Eclipse, and try starting the server again.
2. Fix Folder Permissions for Tomcat Installation
Windows 8 restricts write access to folders like C:\Program Files, which might be where your Tomcat is installed. This can prevent Eclipse from writing to logs or configuration files:
- Right-click your Tomcat installation folder (e.g.,
C:\apache-tomcat-9.0.7) and select Properties > Security > Edit. - Select your current user account and check the Full Control box under Permissions for [Your User].
- Click Apply then OK, then restart Eclipse and attempt to start Tomcat.
3. Update Eclipse.ini for JDK 10 Compatibility
Eclipse Oxygen.3a doesn’t have out-of-the-box perfect support for JDK 10, so we need to tweak the eclipse.ini file:
- Locate the
eclipse.inifile in your Eclipse installation directory. - Open it in a text editor, and add these lines above the
-vmargssection:-vm C:\Program Files\Java\jdk-10.0.1\bin\javaw.exe - Also, find the line
-Dosgi.requiredJavaVersion=1.8and change it to-Dosgi.requiredJavaVersion=10(this tells Eclipse to target JDK 10 explicitly). - Save the file, restart Eclipse, and test the server startup.
4. Clean Tomcat Workspace and Eclipse Caches
Corrupted cache files can often cause startup issues:
- In the Servers view, right-click your Tomcat instance and select Clean.
- Next, select Clean Tomcat Work Directory to clear any cached deployment files.
- Go to Eclipse’s Project > Clean menu, select Clean all projects, and click OK.
- Restart Eclipse and try starting the server once more.
5. Check Eclipse Console for Specific Error Details
If none of the above work, the key is to look at the actual error message in Eclipse’s Console:
- Switch to the Servers tab in the Console view (use the dropdown if multiple consoles are open).
- Look for errors like port conflicts (use
netstat -anoin CMD to find and kill the process using port 8080), missing dependencies, or configuration file issues. - Address the specific error you find—this will lead you directly to the root cause.
内容的提问来源于stack exchange,提问作者Saurabh Bhoomkar

