I have tried and looked at the past Gradle Java_HOME questions, however none of the options seems to work. I followed this website to install Gradle. However, all the Gradle commands I run result in the following error:
ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/jdk1.8.0_241
Please set the JAVA_HOME variable in your environment to match the location of your Java installation.
I'm also using OpenJDK 11 and
$ echo $JAVA_HOME
/usr/lib/jvm/jdk1.8.0_241
which java
to find where is your java installation – danilo Jul 15 '20 at 03:20update-java-alternatives -l
https://askubuntu.com/a/150065/734218 – danilo Jul 15 '20 at 03:24$JAVA_HOME
is pointing to the wrong location, probably this directory/usr/lib/jvm/jdk1.8.0_241
doesn't exists – danilo Jul 15 '20 at 03:25