java.exe
is neither a JVM nor an interpreter. It is a launcher – a small program typically written in C which does the following:
- Locates an installed JRE
- Loads JVM dynamic library (
jvm.dll
) - Creates a new Java Virtual Machine using the Invocation API
- Finds the main class and calls the
main()
method using JNI
JRE roughly consists of
- JVM –
jvm.dll
- Class Library –
rt.jar
- Native libraries – the layer between the class library and the OS platform, e.g.
java.dll
,net.dll
,nio.dll
,awt.dll
etc. - Resources – fonts, properties, strings etc.
Now, the Bytecode Interpreter, the Bytecode Verifier, the Class Loader, the JIT compiler, the Garbage Collector and many other cool stuff – are all parts of the Java Virtual Machine.