This distribution is for the Second Edition of the book; files here do not match the First Edition of the Java Cookbook. If you want files for the first edition of the book, try here.
All the important source code files from The Java Cookbook (plus quite a number that are not covered in the book) are here. Most of these files are Java source code.
For the few that are Applets, if you load the Applet's HTML file from here, the applet will not run. The HTML files must be saved to disk and the applets compiled, before you can run them.
All files are Copyright ©: All rights reserved. See the accompanying Legal Notice for conditions of use. You can pretty much do what you want with these, including using them commercially, under the terms of the original Berkeley Copyright, which has been approved as an Open Source Initiative conditions-of-use.
Most of the questions people ask relate to the other APIs that I have used in the book. The following table will help you resolve missing classes. Remember that, as discussed in Section 2.5, you need to have these in your class path both at compile time and at run time.
Used In | Package | Description | Download From... |
---|---|---|---|
Everywhere | com.darwinsys.*.* | My utility classes; useful classes collected from various places in the book. | javacook.darwinsys.com |
1.13 | junit.* | JUnit Testing Classes | www.junit.org |
11.* | javax.comm.* | Serial Communications | Several implementations. Sun's is at java.sun.com/products/javacomm/. See also RXTX.org. |
17. | netscape.javascript.* | Netscape JavaScript interface (see netweb/JScript.java) | None (included with Netscape; see e.g., $NETSCAPE/lib/classes/java40.jar) |
18 | SPDF | Ian's toy PDF library | Here |
com.pdflib and others | Various PDF libraries | See bottom of page 535/top of page 536. | |
19.* | javax.mail.* | Java Mail API; activation.jar also needed; both in J2EE) | java.sun.com/products/javamail/ |
26.3 | com.ibm.cs.* | Bean Scripting Framework and IBM Scripting | http://oss.software.ibm.com/developerworks/projects/bsf/ |