http://www.oracle.com/technetwork/java/javase/downloads/index.html.
Java is available as both 32-bit and 64-bit binaries. Deciding which one to download can be complex, see 32-bit or 64-bit.
Java 1.8 (also known as Java 8) is preferred.
The development version available via git is best built with Oracle Java 1.8 (also know as Java 8) because the Accessors use Nashorn. It is possible to build Ptolemy II with older versions of Java or with OpenJDK, but these configurations are not supported. It is possible to build the development version using Java 9, but Java 9 has not been tested with Eclipse and Ptolemy II.
In January, 2015, the core of development version can be build with Java 1.6 by running configure, but this is not supported or tested. Over time, Java 1.6 is less likely to work.
The full development version of Ptolemy II requires Java 1.7 because particleFiltering uses type inference for generic instance creation and catches multiple exceptions. Over time, more and more code will require Java 1.7 and Java 1.8.
Note that the core of Ptolemy that is used by Kepler can be built with Java 1.7. To use Java 1.7 would require excluding ptolemy/actor/lib/jjs and org/ptolemy/machineLearning. The core of Ptolemy II is built using Java 1.7 on a nightly basis as part of the Kepler build.
The development version of Ptolemy II requires Java 1.8 to use Nashorn in ptolemy/actor/lib/jjs and IntStream in org/ptolemy/machineLearning. Over time, more and more code will require Java 1.8. The
$PTII/build.default.xmlworks best with Java 1.8The Oracle (formerly Sun) Java Development Kit (JDK) is preferred.
The IBM JDK will work under Linux.
OpenJDK may work with Ptolemy II, but could have problems with Kepler.
It is a good idea to be sure that the JDK bin/ directory is in your Windows Path.
c:\Program Files\Java\jdk1.8.0_121\bin; at the start of the path. Note that jdk1.8.0_121 should be updated to match the directory that was created by the installer. After installing Java, then the next step is to install Eclipse.