Ubuntu – Where is the java library class files located in file system

netbeanssoftware-center

I have installed Netbeans 6.9 just by one click thru Ubuntu Software Center. It didn't ask me for JDK installation folder during installation.

It works.

I want to check CLASSPATH variable just for learning purpose. But for the command echo $CLASSPATH.

It only gives a newline output.


I have checked for JDK directory in /usr/local directory. But I can't find JDK directory.


My questions are:

Where is the class files of API located in file system?
System is a class in package "java.lang". Then the System class file must be in the path of
/some/where/java/lang/System.class
.
I want the path where the "java/lang/System.class" file resides.
Where is the packages physically located in file system?
Here the package means java package such as "java.lang" or "java.io"
(I want just to know for learning purpose)

Best Answer

Open Alternatives Configurator:

Opening the Alternatives Configurator

Select java in the navigation sidebar:

Alternatives Configurator showing configured java alternatives

This will show you which java runtime environments / SDKs are installed, which one is currently active and where to find them, all in one go. The respective package names are similar (e.g. search Synaptic or Software Center for openjdk or java6).