Throw descriptive exception when JDK is not installed.

Throw a descriptive exception (instead of NullPointerException) when JRE is used
instead of JRE.