Java code runs in a JVM, which is how they achieve the "Compile once, run anywhere" idea. But, this means in order to run a Java application you need to have a JVM installed. By downloading the JRE, you get a JVM and a Java API which allows applications written in Java to run on your computer.