views:

1807

answers:

5

I've finally gotten around to learning Java and am looking for some documentation for Java that I can download and read offline. Something like Sun's stuff but zipped up or as a PDF or CHM.

I'm using Eclipse so something that integrates with that would be nice. It already seems to have some of what I want somewhere (the javadoc stuff) but I don't see how to search it and it and I'm not seeing a language ref.

+5  A: 

Full Documentation in Windows Help Format http://javadoc.allimant.org/

Timur Fanshteyn
A: 

Read the JavaDocs. Especially the java.util.Collections framework. The core Java library is extremely well documented for the most part.

I also tend to browse the source to get a good understanding of how things work. You should java the src.zip set up so you can browse inside JDK classes. It will also teach you good design; learn from the masters!

Some very useful commands to memorize in eclipse:

Ctrl-Shift-T Open Type: search as you type a class name, select it to jump directly to it. You do not need to know the package, it searches all classes by their simple names.

F4 Open Type Hierarchy. With the cursor on any class reference in source or on a class in the package explorer, hitting F4 will open a type hierarchy.

Ctrl-T Quick type hierarchy. It's like F4 but opens a quick popup browser. Very convenient. My favorite use is to place it on an interface, and Ctrl-T will list all implementing classes.

Mark Renouf
Where are the JavaDocs? Is it in the code? How do I search all of it? I'm thinking of questions like "where is Java's usleep?" and "What does java uses for console output?" Both of those took me a minute or more to answer and with good search on the right docs should have taken seconds.
BCS
+6  A: 

I'm not sure that I fully understand your question.

If you are interested in materials about learning Java (rather than API references), you can download all of it as a zip file. It will be multiple HTML files, but I've never seen a real problem with browsing them unless I wanted a printout. If you need a printout of the tutorial, just get the tutorial in book form.

If you are looking for the JavaDocs for a specific API, and you use Eclipse, your best bet might be to use the version of Eclipse that is specific for Java and comes packaged with the JDK source code (or just download the source code). You can then read the documentation of methods through different views like the Java Browsing view.

Uri
That'll do, that'll do. I wonder how I failed to find it (I did look :).
BCS
The Sun website wouldn't get a high grade on its usability. I always have a hard time finding what I'm looking for there.
Uri
I was looking for this too, as I usually develop while riding the train and my internet is spotty to say the least... It seems to have moved; http://www.oracle.com/technetwork/java/javase/downloads/index.html#docs appears to be the current location but I haven't downloaded it yet due to aforementioned network challenges...
dash-tom-bang
+2  A: 

Once you setup Eclipse for Java development using the Sun JDK in Preferences->Java->Installed JREs, you can attach the Sun javadoc archive file to the JRE in question. Just make sure that you pick the JDK installation directory as the root of the JRE. Eclipse will automatically attach to the src archive there. Then when you make a Java project, you can use the package explorer to browse through the classes and read the javadoc by expanding the JRE System Library entry in your new project. The majority of the api is in the rt.jar.

Jay R.
A: 

Also you can try Apatite which helps in learning the vast API by association.I don't think its available offline though.

prateek urmaliya