atlas-checks
atlas-checks copied to clipboard
[Bug] BUILD FAILED in ubuntu 18
in ubuntu 18.04 with openjdk 11 obtain this error after follow the instructions (gradle installed via apt install gradle, version 4.4.1)
./gradlew run
Downloading https://services.gradle.org/distributions/gradle-6.3-bin.zip
.........10%..........20%..........30%.........40%..........50%..........60%.........70%..........80%..........90%..........100%
Welcome to Gradle 6.3!
Here are the highlights of this release:
- Java 14 support
- Improved error messages for unexpected failures
For more details see https://docs.gradle.org/6.3/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 4m 27s
1 actionable task: 1 executed
Hey @stefanocudini , could you verify that the $JAVA_HOME variable (or default java version) on the server is set to jdk11?
yes I have jdk 11:
$ java --version
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-2ubuntu218.04)
and dir exists:
$ echo $JAVA_HOME
/usr/lib/jvm/java-8-openjdk-amd64
Okay... looks like you have java 11 installed, but your $JAVA_HOME
default is set to openjdk8; Can you try changing that to your openjdk11 path?
Any luck @stefanocudini ?