Where is Sun's JDK located on the filesystem?

9,246

Solution 1

From a terminal, Confirm if the package is installed using.

sudo dpkg -l|grep -i sun-java6-jdk

List all the files installed by the package using

sudo dpkg -L  sun-java6-jdk

The listing of all files will help you to locate where directories/files installed by Ubuntu.

Solution 2

Install sun-java6-sdk and it'll install the SDK. The SDK and the JRE are separate packages.

Solution 3

Try this command

update-alternatives --display java

This will list all java packages installed in your system.

Sample output:

java - auto mode
  link currently points to /usr/lib/jvm/java-6-sun/jre/bin/java
/usr/lib/jvm/java-6-sun/jre/bin/java - priority 63
  slave java.1.gz: /usr/lib/jvm/java-6-sun/jre/man/man1/java.1.gz
Current 'best' version is '/usr/lib/jvm/java-6-sun/jre/bin/java'.

Hope this helps.

Solution 4

If you want to find out what is the default on your system you could do it like this.

ls -ltr /etc/alternatives/javac

It will list a symbolic link pointing to the default jdk of your system.

On my system the default is located at '/usr/lib/jvm/java-6-openjdk'. There is also an alternative jdk installed at '/usr/lib/jvm/java-6-sun'.

If there aren't any you will need to install the package 'sun-java6-jdk' as pointed out in some other post.

Share:
9,246

Related videos on Youtube

Maxwell175
Author by

Maxwell175

Updated on September 17, 2022

Comments

  • Maxwell175
    Maxwell175 over 1 year

    I installed Sun's JDK and i can't locate it.

    The one located at /usr/lib/jvm/java-6-sun/ is only JRE, where is JDK?

  • Peretz
    Peretz about 13 years
    i installed it.
  • Thomas Ward
    Thomas Ward about 13 years
    All you'd need to worry about is having it installed. Eclipse and other IDEs will be able to detect the software.
  • Maxwell175
    Maxwell175 over 8 years
    Only one that truly answers the OP's question.