As to why you need the JDK. The JRE (Java Runtime Environment) simply runs java programs. The JDK (Java Development Kit) however contains tools for compiling Java source code (.java) into Java bytecode (.class) which is what is run by the JRE. So you can run Java programs without the JDK but you can't compile your own Java programs without the JDK.