JDK 1.6 Tomcat 6.0.53 cannot start inside Eclipse EE 2022-12

255 views Asked by At

I am using JDK 1.6, Error

FATAL ERROR in native method: processing of -javaagent failed
java.lang.UnsupportedClassVersionError: org/eclipse/jdt/launching/internal/javaagent/Premain : Unsupported major.minor version 51.0

If run standalone, success

enter image description here

enter image description here

if run debug inside Eclispe for Java EE 2022-12

enter image description here

enter image description here

enter image description here

How to fix it?

2

There are 2 answers

2
nitind On BEST ANSWER

You can't. The needed classes are no longer compatible with Java 1.6, which in fairness ended free public updates close to a decade ago. The "solution" is to use an older IDE release.

0
Leopoldo Ghielmetti On

I have the same kind of problem with a Java 6 application.

The eclipse is declared compatible from Java 1 to the last version (just go in the "Execution Environment" setting and you can see that all java versions are still supported) but it seems they have broken the compatibility without announcing anything. This is very annoying but as I have seen until now, eclipse is very badly maintained and it's not the first time they break compatibility with some java library or some module. Maybe the correct solution is to not use eclipse anymore and migrate to some other IDE as almost all my coworkers have done (IntelliJ seems to be the main choice today), I'm still on eclipse because I'm accustomed to it, but I shall consider the change.