The Java Virtual Machine is part of the JRE or Java Runtime Environment. When you want to execute java programs, you will need to install the JRE.
But whenever you want to write your own java programs, you'll need the J2SDK or Java 2 Software Development Kit. The SDK contains the JRE and a compiler. The JRE will let you run Java programs, the compiler will let you translate the .java files into .class files which contains byte code. ANd it is the JRE who understands this byte code and translates it into the machine code of the OS you've installed your JRE or J2SDK on.
> ANd it is the JRE who understands this byte code and translates it into the machine code of the OS you've installed your JRE or J2SDK on.
Not quite.
The jvm (Java virtual machine) understands byte code and creates code that the underlying OS understands. The OS then creates code that the computer's cpu understands and runs.