Google closure compiler for java 8

549 Views Asked by At

which Google closure compiler version is for java 8?

Tried v20220905 version:

java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner 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
2

There are 2 best solutions below

0
funkygono On

You didn't provide much information. Anyway, the problem is linked to the version of the JDK your using.

Required Java version in 55 - ie Java 11 (or more) Your JDK version is 52 - ie Java 8

You should upgrade you JDK (or use a version of this lib that support Java 8).

For more information about Java file version: https://en.wikipedia.org/wiki/Java_class_file#General_layout

0
Lonzak On

According to the docs version v20220502 is the last version compiled against Java8. (The next version requires java 11)

<dependency>
    <groupId>com.google.javascript</groupId>
    <artifactId>closure-compiler</artifactId>
    <version>v20220502</version>
</dependency>