Java_home is set to an invalid directory

I have tried and also looked at the past Gradle Java_HOME concerns, yet namong the alternatives appears to occupational.I adhered to this webwebsite to install Gradle. However, all the Gradle regulates I run result in the adhering to error:

ERROR: JAVA_HOME is collection to an invalid directory: /usr/lib/jvm/jdk1.8.0_241Please collection the JAVA_HOME variable in your environment to complement the area of your Java installation.I"m also utilizing OpenJDK 11 and

$ echo $JAVA_HOME/usr/lib/jvm/jdk1.8.0_241


You watching: Java_home is set to an invalid directory

*

*

You have the right to find java residence by utilizing the following command:

java -XshowSettings:properties -version 2>&1 > /dev/null | grep "java.home" It will print somepoint like:

java.house = /path/to/java_homeYou have the right to set the output of this command as JAVA_HOME by copying the course and also adding the complying with line to your ~/.bashrc.

export JAVA_HOME=/path/to/java_home

*

Thanks for contributing a solution to Ask Ubuntu!

Please be certain to answer the question. Provide details and also share your research!

But avoid

Asking for aid, clarification, or responding to other answers.Making statements based on opinion; ago them up through referrals or personal experience.

To learn more, check out our tips on composing excellent answers.




See more: Allow Applications To Take Exclusive Control Of This Device Windows 10

Article Your Answer Discard

By clicking “Article Your Answer”, you agree to our terms of organization, privacy policy and also cookie policy


Not the answer you're looking for? Browse other inquiries tagged java gradle or ask your own question.


*

website style / logo design © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.4.1.38966




See more: Dell Mobile Print For Android Mobile Devices? Dell Mobile Print App For Android

Ask Ubuntu functions ideal with JavaScript enabled
*

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can save cookies on your gadget and disclose information in accordance via our Cookie Policy.