6.825: Java Resources

Websites | Books | Tools | Beanshell | Tips

Web Sites


Several people have asked which books are best for learning Java. The answer depends on prior programming experience and personal inclination.

Professor Kaelbling recommends the following two books:

Mike Ross recommends Java In A Nutshell by David Flanagan (online here if you are on an MIT network), but admits that it is only helpful if you are already familiar with object-oriented programming from C++. In addition, the newest edition splits all the information about AWT and Swing (the graphics display classes) into a separate book, Java Foundation Classes In A Nutshell.

Juan Velasquez recommends Thinking In Java by Bruce Eckel, which is also available at Amazon.com and at Quantum Books.

Also, MIT has a subscription to Safari which allows you to look at many technical books online. It's available through Vera on the MIT libraries page.

Free Tools

If you shudder at the thought of developing in Emacs or Vi, there are several free Java IDEs that you can check out. Netbeans and Borland's JBuilder Personal will work on Solaris, Linux, or Windows, and Netbeans also supports Mac OS X. For the purpose of class assignments, however, Emacs, Vi, Notepad, or some other text editor will be perfectly adequate.


Java comes with a command-line debugger, jdb, which is not very full-featured. IDEs usually come with integrated graphical debuggers. If you want to use a debugger, but don't want to use an IDE, try JSwat.


Even if you are an experienced Java programmer, you may not have heard of Beanshell. Beanshell provides an interactive text-shell environment for evaluating Java expressions and interacting with a running JVM. This is a very useful debugging tool, as it allows you to instatiate and call methods on objects without recompiling (though you do need to restart the shell if you want to change a compiled class).

You should avoid using the 1.3 releases of Beanshell, they have serious bugs in managing for-loop iterations. Use the 1.2 releases instead. The 2.0 releases are brand-new betas and may also be buggy (although they do not have the aforementioned for-loop bug).

To install beanshell,

  1. Download the JAR file
  2. Add it to your classpath, by:
  3. Run it by:

More documentation is available on the Beanshell website.

Assorted Tips