Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Does Eclipse 2021-09 support running java 1.7 unit tests?(Unsupported major.minor version 52.0 in RemoteTestRunner running java 1.7 junit test)
Does Eclipse 2021-09 support running java 1.7 unit tests? [message #1847467] Thu, 28 October 2021 09:06 Go to next message
Paul Cullen is currently offline Paul CullenFriend
Messages: 2
Registered: October 2021
Junior Member
I've recently upgraded my Eclipse installation to 2021-09, but I'm no longer able to run junit tests without getting the following exception.

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/jdt/internal/junit/runner/RemoteTestRunner : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)

I have the Java Compiler compliance set to 1.7 in my preferences, similarly with the execution environment.

My default JRE set in preferences is java-7-openjdk-amd64.

The error seems to imply that the RemoteTestRunner class itself is compiled under java 8 and cannot be run under java 7.

I don't know how to fix this, or even if it is possible to.

Please help.
Re: Does Eclipse 2021-09 support running java 1.7 unit tests? [message #1847487 is a reply to message #1847467] Thu, 28 October 2021 17:47 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you're using the IDE (JUnit Plugin Tests) you must use Java >= 11 these days.

For standalone JUnit tests you may get away with Java >= 8.

(It's usually the launch config JRE that needs updating.)

Regards

Ed Willink

[Updated on: Thu, 28 October 2021 17:50]

Report message to a moderator

Re: Does Eclipse 2021-09 support running java 1.7 unit tests? [message #1847501 is a reply to message #1847487] Fri, 29 October 2021 07:59 Go to previous message
Paul Cullen is currently offline Paul CullenFriend
Messages: 2
Registered: October 2021
Junior Member
ok thanks Ed.

[Updated on: Fri, 29 October 2021 07:59]

Report message to a moderator

Previous Topic:Eclipse quick fix doesn't show awt classes
Next Topic:Eclipse and JDK
Goto Forum:
  


Current Time: Thu Mar 28 18:13:47 GMT 2024

Powered by FUDForum. Page generated in 0.04884 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top