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)
2 Answers
Open Alternatives Configurator:
Select java in the navigation sidebar:
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).
1). Inside the JDK installed path goto jre/lib, For instance in Linux the path maybe :- /usr/lib/jvm/java-7-openjdk-amd64/jre/lib
2). Copy the rt.jar in any temporary folder and only then extract it.
3). After extracting, You will then find the available built-in packages and classes inside these packages.