Always look for a JDK (or JRE) that has been Sun certified. Sun has a certification test (TCK) with tens of thousands of individual test cases that a JDK (or JRE) must pass before being certified. While not infallible, this TCK does reasonably ensure that a JDK correctly implements the Java SE specification. It also means that Java apps compiled with one JDK will run correctly on any JVM.
Some popular JDKs/JREs/JVMs that pass the certification: Sun, JRockit, IBM, HP, Unisys, Apple, OpenJVM (available in latest Linux distros).
Note that the GNU JVM that comes with many Linux distros does not pass the TCK (this is a guess because I know it has issues running app servers).