In order to compile and run your Java code you should have Java Development Kit (JDK) installed for compilation of your Java code and Java Runtime Environment (JRE) for running your code. JDK already includes JRE. It means that if you installed JDK, then you do not have to install JRE.
- If you develop Java code, then you need JDK
- If you only run Java application (and do not compile), then you need JRE
JDK and JRE you can download from this site
Sometimes it is needed to install JDK (or JRE) silently (w/o user intervention). In this case, it is worth checking following articles:
- http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/silent.html <- this one helped me to handle silent install of JRE 1.6