Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
47
rated 0 times [  47] [ 0]  / answers: 1 / hits: 108212  / 2 Years ago, thu, september 8, 2022, 9:35:01

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.


More From » java

 Answers
2

Before running the command try entering:



export JAVA_HOME="path_to_java_home"



Where path_to_java_home is the folder where your bin/java is.



If java is properly installed you can find it's location, by using the command:



readlink -f $(which java)



Don't forget to remove bin/java from the end of the path while putting it into JAVA_HOME


[#22256] Saturday, September 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kroapathe

Total Points: 445
Total Questions: 117
Total Answers: 99

Location: Botswana
Member since Sun, Sep 19, 2021
3 Years ago
;