Importing Pi4J example gradle app into Eclipse gets Unsupported class file major version 61 #278
-
I'm running a Raspberry Pi 4 with the 64-bit Raspberry OS (Raspbian). I've downloaded the AArch64 edition of Eclipse and it runs fine. I'm able to create and run Java applications. I installed Pi4J V2 using "curl -sSL https://pi4j.com/v2/install | sudo bash", which completed successfully. The Pi4J Jar files are found in /opt/pi4j/lib. I then cloned [email protected]:Pi4J/pi4j-example-minimal.git and was able to build and run using the provided Gradle wrapper and run.sh scripts. However, when I import the gradle project into Eclipse, I get an error from Gradle "Unsupported class file major version 61". I've installed OpenJDK 11 using "sudo apt install openjdk-11-jdk" and it is in /var/lib/jvm/java-11-openjdk-arm64. Although Eclipse comes with OpenJdk 17, I've configured it to use the OpenJdk 11 which I've installed on the machine. However, when I refresh the Gradle project, I still get the error and the pi4j imports are not found. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Well, it looks like I found the answer. I needed to also set the Java Home in the Advanced Options on the Gradle properties panel in Eclipse. Now it's working as expected. |
Beta Was this translation helpful? Give feedback.
-
Thanks for answering your own question :-) |
Beta Was this translation helpful? Give feedback.
Well, it looks like I found the answer. I needed to also set the Java Home in the Advanced Options on the Gradle properties panel in Eclipse. Now it's working as expected.