Press releases

"Java Cookbook" Aims to be the Best "Second" Java Book Around

Press release: July 10, 2001

Sebastopol, CA--If you've ever reached for a cookbook, you know that you usually have a fair idea of what you'd like to accomplish before you start--you're just looking for instructions on how to get it done. Your cookbook will assume a certain knowledge, that you know how to preheat your oven and boil water, for example. The best cookbooks will offer a little of everything from "tried and true" recipes that any cook might want, to useful but trickier techniques you've heard about but never attempted. Author Ian F. Darwin provides this same sort of all-around resource for Java developers in his just-released Java Cookbook (O'Reilly,US $44.95). Patterned after the best-selling Perl Cookbook, the Java Cookbook is a collection of hundreds of solutions to problems that Java programmers frequently face.

The Java Cookbook offers developers a comprehensive collection of short, focused pieces of code that can easily be incorporated into other programs. Darwin's emphasis is on techniques that are useful, tricky, or both. Recipes range from simple tasks, such as getting one's CLASSPATH right and reading information from the environment, to entire problems that demonstrate how to put XML to work or incorporate email into an application.

"The reader of this book should know the syntax and basic ideas of Java, but have a pressing need to get down to using it in a particular (probably medium to large scale) application, in which a lot of different APIs need to be applied quickly," explains Darwin. "They'll be able to learn about and apply a wide variety of APIs, some of which are new to Java, like Regular Expressions. They'll find out about most of the standard APIs, and some obscure points about how to use them. And, of course, they'll be able to copy and paste code examples to make use of these things."

Darwin adds, "There are many introductory books, and many good advanced, topic-specific Java books. First and foremost, Java in a Nutshell by Dave Flanagan offers a brief overview of the language and API, and a detailed reference to the most essential packages. Learning Java by Patrick Niemeyer and Joshua Peck contains a slightly more leisurely introduction to the language and the API. The Java Cookbook is unique because it aims to be the best second Java book for everybody."

The recipes in the Java Cookbook are the product of years of learning, experimenting and fine-tuning the contents of the author's own javasrc directory. After developing and teaching courses in Java, Darwin found that the directory had grown so large it required numerous subdirectories, and soon it became evident to Darwin that some kind of documentation was needed. Darwin claims, "Once this body of code reached a certain critical mass, it spontaneously ignited into the idea for a Java book."

Topics covered in the Java Cookbook include compiling, running and debugging Java programs; interacting with the environment; strings and pattern matching; servlets and JSP; developing network clients and servers; distributed programming; internationalization, and much more. Whether developers choose to use the cookbook's recipes directly, as a source of ideas, or as a way to learn a little more about Java and what they can do with it, they will find that the Java Cookbook will become an essential part of their library.

Online Resources:

Java Cookbook
By Ian F. Darwin
ISBN 0-596-00170-3, 850 pages, $44.95 (US)

About O’Reilly

For over 40 years, O’Reilly has provided technology and business training, knowledge, and insight to help companies succeed. Our unique network of experts and innovators share their knowledge and expertise through the company’s SaaS-based training and learning platform. O’Reilly delivers highly topical and comprehensive technology and business learning solutions to millions of users across enterprise, consumer, and university channels. For more information, visit

Email a link to this press release