

Readlink - print resolved symbolic links or canonical file names We can do that through read link Readlink

Symlink => Symlink => Actual folder or file If you want to use whereis! One need to resolve the symlinks too! And here recursively! usr/lib/jvm/java-10-openjdk-amd64/bin/java is the actual java binary! And /usr/lib/jvm/java-10-openjdk-amd64 is the java home. usr/bin/java =symlink to=> /etc/alternatives/java =symlink to=> /usr/lib/jvm/java-10-openjdk-amd64/bin/java

Which java => give Command path => return a symlink to a symlink It'd look something like:įirst whereis! Just like which doesn't resolve symlinks! You can run ls /usr/lib/jvm/java-11-openjdk-amd64 and it will show the jdk folder content. usr/lib/jvm/java-11-openjdk-amd64/bin/java It returns the path, in my case it returns: Then, in order to locate the jdk folder, run the command below: readlink -f $(which java) I also try giving /usr/share/java to the ghidra installation, but it complains that this is not a valid jdk home directory because it is missing a bin folder.įirst, make sure the installation was done correctly by running java -version, you should see something like: Here is a bunch of jar files? Usually the jdk has a bin folder and so on? So I cd to the first directory, ans look: /usr/share/java$ lsĬommons-logging-1.2.jar java-atk-wrapper.jar pdfbox-1.8.16.jarĬommons-logging-adapters-1.2.jar java_defaults.mk pdfbox.jarĬommons-logging-adapters.jar java_uno.jar ridl-6.4.7.jarĬommons-logging-api-1.2.jar juh-6.4.7.jar ridl.jarĬommons-logging-api.jar juh.jar unoloader-6.4.7.jarĬommons-logging.jar jurt-6.4.7.jar unoloader.jar Java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz If I now run whereis java: /usr/share/java$ whereis java

So, I think cool, and run: sudo apt-get install openjdk-11-jdk JDK 11+ (64-bit) could not be found and must be manually chosen! I'm currently trying to install ghidra on my Ubuntu 20.04 machine.
