Hello fellow Ubuntu users,
I am trying to learn how to write modifications to Minecraft. In order to follow the tutorial I am using, I need to run a "gradlew". The command is as follows
./gradlew setupDecompWorkspace eclipse
This yields the following
ERROR: JAVA_HOME is set to an invalid directory: /usr/local/java/jdk1.8.0_20
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Obviously I don't know what to do or even what this means. Any help is much appreciated.
export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac) ))) # drive from javac not javawhich gives me echo $JAVA_HOME /usr/lib/jvm/java-21-openjdk-amd64 your version may vary ... essentially JAVA_HOME == dir above bin where javac lives – John Scott Stensland Nov 30 '24 at 20:18