<< 2011-2 >>
Department of
Computer Science
 

Java Resources

Java Compiler and Documentation

The most popular compiler for Java is the JDK compiler from Sun. You need version 5.0 or better of the JDK. You can find out which version is currently installed in the Computer Science department by typing the javac -version and java -version commands. You can get the JDK from the main Java site:

Main Java site (Java for Windows, Linux, Solaris)

You need to look for several things, in order.

The Java site is a "magazine" site, i.e. it changes frequently which can make it difficult to find what you want. At the time of writing, you follow the link to J2SE, then J2SE 5.x (under "popular downloads", or the right), then choose to download JDK and follow the download instructions. (Don't download the netbeans IDE, or the JRE, or source code).

Follow the installations instructions carefully, especially the bit about changing the PATH environment variable, so that you can use the javac and java commands from any directory.

You may also want to download the Java documentation. This is essential if you want to be able to use Java without being online. It contains the "Java Platform API Specification" (ie library documentation) which is vital to refer to while programming. It also contains a useful demo collection and pointers to the language specification, a style guide, etc, etc. If you are online, you can view the documentation on the main Java site:

Java 5 API Documentation

It is strongly suggested that you do not download or use any IDEs (Integrated Development Environments) until you regard yourself as a Java expert. See later for IDE information.

Learning Java

The JDK provides the commands javac Prog.java for compiling programs, java Prog for running programs, and subsidiary commands such as appletviewer, jdb and javadoc. On a PC, you have to run these from a DOS prompt. For information about an IDE (window-based Integrated Development Environment), see below.

There are lots of good and bad books on Java. One of the good ones is the one by Horstmann, which has a supporting web page at:

"Computing Concepts with Java Essentials"
by Cay Horstmann, 3rd edition, Wiley.

There are online beginner's tutorials, not so good, if you prefer. One is:

Brewing Java (University of North Carolina)

The so called "Java Tutorial" is a book with an online version:

The Java Tutorial

It is badly named because it is not a beginner's tutorial for the Java language, but rather an advanced tutorial for the Java libraries. However, it contains lots of useful information about how to use the advanced features of the libraries, and contains a lot of (complex) example programs from which you can extract code or information. It is best viewed directly at the Java site so you get the most up-to-date version (though it can be downloaded for quicker access):

Java Editors and IDEs.

On the whole, using IDEs (Integrated Development Environments) is not recommended for Java beginners. They add significantly to the learning curve, concentrate on the wrong issues, distract you from object oriented design, use a lot of resources, prevent you from using your favourite editor, and often decrease productivity, unless you are a full-time developer. However, if you like IDEs, here are a few choices.  First, some big full-featured IDEs

If you want something smaller and simpler:

Even without an IDE, you can customise your own environment to increase your productivity in a number of ways, e.g.

© 1995-2012 University of Bristol  |  Terms and Conditions
About this Page