About the Tutorial
What is "the Java Tutorial"?
The Java Tutorial is a programmer's guide for the Java platform. It has two forms:
- The online version This version is a hyperlinked, interactive set of HTML pages available on the World-Wide Web.
- The books The first edition of The Java™ Tutorial was published in the summer of 1996. Since then, two additional books and several new editions of existing books have been published.
Where can I get the tutorial?
You can read the tutorial online. From the front page you can choose a trail or search the java.sun.com version of the tutorial. If you prefer to view the tutorial on your own system, you can download the tutorial free of charge.
If you prefer to read paper, you can buy the book.
How often is the online tutorial updated?
Sometimes we update as often as once a month; sometimes months pass between updates. Frequently we'll make minor fixes to individual pages without updating the whole tutorial.
What do I need to know about the books before I buy one?
The Swing Tutorial, 2nd edition, last updated for release 1.4, is available in bookstores. The Java Tutorial, 4th edition, updated to release 6.0, was published in October 2006.
How much does the tutorial cost?
You can view the online version free and you can download it for free.
For book prices, consult your preferred booksellers.
Some of the online tutorial isn't finished. What's up with that?
The online tutorial is a dynamic growing document. Read more about that in This Is a Work in Progress!.
About Downloading the Tutorial
How do I download the tutorial?
See Download the Tutorial for information. Unfortunately, we cannot send the tutorial to individuals via e-mail.
If for some reason, you cannot download the tutorial from the web, consider buying the book and using the version of the tutorial contained on the CD included with the book.
Note: If you download the tutorial, feel free to make it available locally at your site. Please do not publicly mirror it to the Web!. See the next question and answer to find out why.
May I mirror the tutorial publicly?
Our policy on distribution is that anyone is permitted have a copy of the online tutorial as long as it's visible only within their own institution (university, business, or whatever) and no one is profiting from the tutorial's distribution.
We've taken this strict position because the many tutorial mirrors mean that search engines generally don't find the most up-to-date version of the tutorial. Instead, search engines find mirror sites, which invariably fall behind. We end up getting e-mail about problems that have been corrected in newer versions of the tutorial. Or perhaps worse, we don't get e-mail and the reputation of the tutorial suffers. We allow local copies because we realize that browsing java.sun.com isn't always practical.
When you tell us about a mirror, we send the offender a friendly e-mail asking them to please move their copy of the tutorial to a place that isn't visible from the outside world.
I'm having trouble unarchiving the tutorial. What should I do?
Many readers can solve this problem by installing or updating software to unarchive compressed files (like Zip files). For example, on the Microsoft Windows platform, you can use WinZip to unarchive the Tutorial.
You can also download only examples, only the current Swing trail, or archived versions of tutorial trails that have been removed from or completely updated in the current online and downloaded versions of the tutorial.
About Getting the Tutorial in Other Formats
Can I get a PostScript or PDF version of the tutorial to download?
No. If you want a hard copy of the tutorial, you can buy or borrow the book. To find out why, read the next question and answer.
Why isn't the tutorial available in PostScript or PDF?
We used to offer a PostScript version of the tutorial, but it caused many more problems than it solved. There were problems with fonts, page size in Europe, older versions of PostScript, and so on. PDF format might solve some or all of those problems, but we also got a lot of complaints about the actual document: "it's just a PostScript dump of the HTML," "the links don't make sense on paper," and so on. PDF wouldn't solve those problems. As a result, we no longer provide PostScript, and we won't be providing it or PDF in the future.
Can you help me with my programming problem?
This question is actually a series of similar questions:
- Here's my code. Can you help me debug it?
- How do I set up my CLASSPATH? How do I set up the compiler? How do I install Windows 95? Where do I get the Java 2 Platform?
- When I try to run one of the tutorial examples on a PC/Mac/Sun it doesn't work at all. Help me.
- I want to write a <<insert description of some program here>>. Where do I begin?
- I'm taking a class and I need help learning Java.
- My boss told me to find out about Java. What is Java? Where do I get it?
- What's a compiler?
Unfortunately we are not staffed to provide answers to these types of questions at this address. Your best bet is to go to the Sun Developer Network (SDN).
By the way, we automatically compile (and always run at least once) all of the examples in the tutorial. The examples work for us. If you are having problems with the examples, then you are probably having configuration problems.
Where's the change history for the tutorial?
Read a complete change history of the tutorial.