Originally Posted by
r-senior
On my 64-bit system it is /usr/lib/jvm/java-7-openjdk-amd64.
To find your JDK directory reliably you need to follow the links to your javac executable through the alternatives system until you stop hitting symbolic links
Code:
$ which javac
/usr/bin/javac
$ ls -l /usr/bin/javac
lrwxrwxrwx 1 root root 23 May 2 10:02 /usr/bin/javac -> /etc/alternatives/javac
$ ls -l /etc/alternatives/javac
lrwxrwxrwx 1 root root 43 May 2 10:02 /etc/alternatives/javac -> /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
$ ls -l /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
-rwxr-xr-x 1 root root 6352 Apr 13 04:00 /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
The location of the JDK for Netbeans, Eclipse, etc. is the directory above the 'bin' directory that contains javac. Hence '/usr/lib/jvm/java-7-openjdk-amd64'.
Found where OpenJDK 1.7 was installed to. OpenJDK is located in the following directory:
/usr/lib/jvm/java-1.7.0-openjdk-i386
NB detected the OpenJDK once it was pointed to where it was installed to. The IDE detected the name and where the docs are located but couldn't locate the sources. Is there a separate OpenJDK 1.7 Sources package that needs to be installed?
Bookmarks