This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm a little confused about where the class library files are kept and how to access them and their documentation. I�m looking at a .java file that has the following import statement (?and package declaration?):
code is here�
I don�t have any problems finding the java.sql documentation in the API specification on Sun�s website. My problem with looking at documentation is with the deqstpr package.
I would also like to understand where these files are kept on my computer, or in this case on a database server (I think).
As with all of my posts, please point out ALL of my misconceptions (even if it�s not my direct question), thank you.
There's no guarantee that there's documentation anywhere for any given Java class. Sun is careful to document everything and publish the documentation in well-known locations, but Joe Developer may not be.
All the package names that start with java or javax are from Sun and are documented in the JDK and on Sun's web site. Anything else (with the exceptions of some org.xml packages, and a few others) come from someplace else, and you have to consult the individual vendor for documentation.
Sun's libraries -- the ones that come with the JDK itself -- are in *.jar files in the JDK distribution. Most them are in j2dskXXX/jre/lib/rt.jar . Other libraries are wherever they've been installed. There's an environment variable named CLASSPATH that's used to tell Java about places where libraries may be installed on your local system.
If you're looking at a "package" statement, then you're looking at source code. A library will be compiled from that source code, but the source isn't the library itself.
A "package" statement tells the Java compiler that the contents of a file should be put into the given package. An "import" statement tells the compiler about other packages that this file references.