Reputation: 1
I'm working on some very old projects. JDK 1.6.0_07 and Tomcat 6.0.14. Unfortunately i lost my Eclipse and needed to install the latest version (2022-12 (4.26.0)) Then installed Tomcat Plugin via Marketplace. I've several other JREs (1.8.0_144, openJdk17) configured in Eclipse, 1.8.0_144 being set as default.
When i start Tomcat via the plugin, it uses the default JRE. With Java 1.8 everything works fine. Setting the default JRE to the Java 1.6 and trying to start Tomcat (without any deployments) via the plugin gets me the following error:
java.lang.UnsupportedClassVersionError: org/eclipse/jdt/launching/internal/javaagent/Premain : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:280) at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338) FATAL ERROR in native method: processing of -javaagent failed
Starting the Tomcat via batch file with 1.6 JRE works just fine (as it should) and i cannot figure where the Java 7 (version 51.0) requirement is coming from when trying to start it from Eclipse.
On a sidenote: Where are the tomcat logs going when starting via Eclipse plugin? The process properties from Eclipse look like:
-Dcatalina.base=C:\java\tomcat-6.0.14
Which is the correct directory for the \logs folder but it's only writing logs there if started via startup.bat not when started via Eclipse Plugin.
Upvotes: 0
Views: 65