Getting the error while running Cucumber TestNG with Java through eclipse

70 Views Asked by At

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/testng/remote/RemoteTestNG has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Tried downgrading and upgrading the TestNG version. The Java version is 1.8. TestNG - 6.14.3 Eclipse: 2023.09, Cucumber 6.19.3

I can trigger if I change the java version in build path to Java-SE11. But I think due to this Spark report and PDF report are not getting generated.

1

There are 1 best solutions below

0
On

I have resolved this issue. Changed the Java version to 1.11 in pom.xml and it works fine now. Able to generate extent html and pdf report both.