At compile time, java file is compiled by Java Compiler (It does not interact with OS) and converts the java code into bytecode.
At runtime, following steps are performed:
is the subsystem of JVM that is used to load class files.
checks the code fragments for illegal code that can violate access right to objects.