Download

What is this stuff?

This is the examples from Ian's Java Cookbook, and a bunch of other Java demonstration programs. In short: Java code, lots of it.

What am I allowed do with this stuff?

Pretty much anything, except claim that you wrote it.

O'Reilly's general policy is: "You can use and redistribute example code from our books for any non-commercial purpose (and most commercial purposes) as long as you acknowledge their source and authorship. The origin of the code should be noted in any documentation as well as in the program code itself (as a comment). The attribution should include author, title, publisher and ISBN..." All the code I wrote is under the BSD license which is even more liberal. You definitely may use this code in any way including commercial projects, as many people have. You do not have to ask me every time. In fact, please do not ask me; I am busy enough that I am quite likely to ignore such queries. Read more on the O'Reilly Web Site.

I do ask that you credit me as the original source of the material. The following should suffice:

The Original Author of this code is Ian Darwin, http://www.darwinsys.com/.
Some code from the O'Reilly Java Cookbook, Second Edition,
ISBN-10: 0-596-00701-9 | ISBN-13: 9780596007010

I would also appreciate, as a matter of courtesy, that you notify me if you use this code in any published papers (academic or otherwise). Thank you.

Problems?

This code requires Java SE 7 (JDK 1.7) or later. If you want to use Java 6, some files will not compile; just remove them or add to the "exclude from compilation" list.

If you have other questions, please read the FAQ (Frequently Asked Questions) and the Errata Pages (at the O'Reilly site).

Java Cookbook Second Edition: Download

You can download the current versions of everything here (these are built from my local CVS repository at least daily):

Or, you can download the older stable version from O'Reilly at http://examples.oreilly.com/javacook2/ (local copy here), but then you have to change it from referring to the darwinsys-api project to installing a local copy of the darwinsys.jar file. Note that this version is only re-created very occasionally, while changes are made in my public CVS repository ... and hence the 'download current versions' above... as soon as I get them working (very occasionally, I must admit, before that).

For some lighter fare, you can also download files individually.

To help you get started, you can download the darwinsys jar file from here.

Java CookBook First Edition: Download

You can still access the last revision of the First Edition Java Cookbook files here. But you should not do this - the Second Edition download is much better! If you want the old ones, here's how... To get started, everybody is likely to need this download of the binary files for the com.darwinsys.jar package.

Here is the complete download of the program files from the book Warning - this is not being updated. I really recommend that everybody upgrades to the Second Edition of the book, not just because I like to sell books, but because it really is so much better!