openjdk 17.0.5 build error
zdavatz opened this issue · 3 comments
zdavatz commented
- Install
openjdk-17.0.5
- cd
aips2sqlite
- run
make aips2sqlite
- results in
./gradlew jar
> Task :compileJava FAILED
/home/zeno/.software/aips2sqlite/src/com/maxl/java/aips2sqlite/MedicalInformations.java:31: error: cannot access jakarta.xml.bind.annotation.XmlAccessType
import jakarta.xml.bind.annotation.XmlAccessType;
^
bad class file: /home/zeno/.gradle/caches/modules-2/files-2.1/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0/bbb399208d288b15ec101fa4fcfc4bd77cedc97a/jakarta.xml.bind-api-4.0.0.jar(jakarta/xml/bind/annotation/XmlAccessType.class)
class file has wrong version 55.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
1 actionable task: 1 executed
make: *** [Makefile:4: aips2sqlite] Fehler 1
zdavatz commented
- I done
rm -r /home/zeno/.gradle
- Results in
bad class file: /home/zeno/.gradle/caches/modules-2/files-2.1/jakarta.xml.bind/jakarta.xml.bind-api/4.0.0/bbb399208d288b15ec101fa4fcfc4bd77cedc97a/jakarta.xml.bind-api-4.0.0.jar(jakarta/xml/bind/annotation/XmlAccessType.class)
class file has wrong version 55.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
FAILURE: Build failed with an exception
zdavatz commented
ok, this returns the wrong value:
$~> echo $JAVA_HOME
/opt/oracle-jdk-bin-1.8.0.92/
zdavatz commented
- Update
.bashrc
- to:
export JAVA_HOME=/opt/openjdk-bin-17.0.5_p8/