[SOLVED]Default OpenJDK Location on Ubuntu

So when I open the default JDK location on a Mac or Windows, I will see the Java version like 1.8.0_22 and then a bin folder, however when I’m on Ubuntu, I see the default OpenJDK folder such as java-11-openjdk (under /etc/java-11-openjdk), but none of there is no bin folder. I’m not sure why this is the case. I’m wondering if someone can tell me the location of the bin folder.

1 Like

Sorry mate, I am not an expert on this. Can you use the java-11-openjdk? Because if you have it installed you might be able to search for it with which java-11-openjdk or something along those lines. The which-command usually shows you were in the path it found the executable.

Edit: In case of my Fedora installation which java showed me that the java executable is in /usr/bin/java for me. Hope this helps.

Java is under /usr/lib/jvm on Ubuntu. Inside the specific version you will find a bin directory with the executables, e.g. /usr/lib/jvm/java-11-openjdk-amd64/bin/java

3 Likes

Thank you!

In the future, you can always use the whereis <program> to figure out at least where the binary is installed, regardless of distro and package manager.

1 Like