Open Morsmalleo opened 2 years ago
Class file version 53 is Java 9 and version 55 is java 11 - are you sure you set Maven to use the desired java version and not just java home?
Try to run ./mvnw -version
to see which java version it uses. Mine is
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Users\****\.m2\wrapper\dists\apache-maven-3.6.3-bin\1iopthnavndlasol9gbrbg6bf2\apache-maven-3.6.3
Java version: 1.8.0_202, vendor: AdoptOpenJdk, runtime: C:\Program Files\AdoptOpenJDK\jdk-8.0.202.08\jre
Default locale: de_AT, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
and compiles fine.
Ah so that's what the problem could be, I will run the command in the terminal and print the output
OK so I ran ./mvnw -version
in a terminal and this was the output
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/kali/.m2/wrapper/dists/apache-maven-3.6.3-bin/1iopthnavndlasol9gbrbg6bf2/apache-maven-3.6.3
Java version: 11.0.13, vendor: Debian, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.10.0-kali9-amd64", arch: "amd64", family: "unix"
I switched to Java 1.8.0_252 provided by the Debian Stretch software repositories and ran the same command and it gave me the same output.
Any solution on this problem? I am running into same thing on my gradle project.
Any solution on this problem? I am running into same thing on my gradle project.
Nothing so far bro, been waiting for a while, not sure what's happening
Any solution on this problem? I am running into same thing on my gradle project.
Nothing so far bro, been waiting for a while, not sure what's happening
I sort of encountered a similar issue today and I have managed to solve it with help from multiple sources from the internet. I learned that the issue is that some class files were compiled using Java X while others were compiled using Java Y.
mvn -v
echo export "JAVA_HOME=\$(/usr/libexec/java_home -v 17)" >> ~/.bash_profile
&& source ~/.bash_profile
mvn clean install
Thanks I'll give this a try
Because the library classes that you're using at the moment are decompiled by Java 11, not different verison of Java. When I check some parent class from some library, it updated by Java version. I mean classes are changing depends on Java version. So you need to match library classes that you use and Java version.
Because the library classes that you're using at the moment are decompiled by Java 11, not different verison of Java. When I check some parent class from some library, it updated by Java version. I mean classes are changing depends on Java version. So you need to match library classes that you use and Java version.
I didn't think Java 9 had an installation candidate because that's what class file 53 is, it's java 9
Keep getting this error everytime I run
./mvnw clean install
, the error arises with bothJava 1.8.0_252
andJava 11.0.3
forKali Linux
, done some research and can't seem to find a solution.