Vitaliy-Yakovchuk / ramus

GNU General Public License v3.0
115 stars 43 forks source link

java.lang.IllegalArgumentException: Unsupported class file major version 61 #29

Open FirstAfterGod2501 opened 5 months ago

FirstAfterGod2501 commented 5 months ago

full stacktrace: `FAILURE: Build failed with an exception.

`

FirstAfterGod2501 commented 5 months ago

OS: Ubuntu 22.04 openjdk 17.0.10 2024-01-16 OpenJDK Runtime Environment (build 17.0.10+7-Ubuntu-122.04.1) OpenJDK 64-Bit Server VM (build 17.0.10+7-Ubuntu-122.04.1, mixed mode, sharing)

i4ox commented 5 months ago

Class version 61 means it does not support Java 17! https://javaalmanac.io/bytecode/versions/. You must use the version of Java that is supported in this project. Gradle has version 6.9.4 here, so you need Java that supports this version.

You can install java 8(for example) and make it use by default:

wget https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u352-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u352b08.tar.gz && tar xf OpenJDK8U-jdk_x64_linux_hotspot_8u352b08.tar.gz && rm OpenJDK8U-jdk_x64_linux_hotspot_8u352b08.tar.gz && rm /opt/jdk8u352-b08 -rf && sudo mv jdk8u352-b08 /opt

sudo ln -svf /opt/jdk8u352-b08/bin/java /usr/bin/java