Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] BUILD FAILED in ubuntu 18 #293

Open
stefanocudini opened this issue May 10, 2020 · 4 comments
Open

[Bug] BUILD FAILED in ubuntu 18 #293

stefanocudini opened this issue May 10, 2020 · 4 comments
Labels

Comments

@stefanocudini
Copy link

stefanocudini commented May 10, 2020

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
@danielduhh
Copy link
Collaborator

Hey @stefanocudini , could you verify that the $JAVA_HOME variable (or default java version) on the server is set to jdk11?

@stefanocudini
Copy link
Author

stefanocudini commented May 11, 2020

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

@danielduhh
Copy link
Collaborator

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?

@danielduhh
Copy link
Collaborator

Any luck @stefanocudini ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants