How jre work?

bytecode is load by java tool in jvm?
then what hepends with bytecode … and which kinds of VIRTUAL ENVIROMENT IS created by JRE.???

1 Like

Java source file (.java file) is compiled (by java compiler - javac) to bytecode (.class file). It seems you know that…

When you run your program (by java command), JVM starts and one of it’s parts ClassLoader loads classes (that’s what happens with bytecode). When your program runs JVM translates bytecode instructions to OS instructions, that’s how virtual environment works - JVM that’s written for concrete OS (like Windows, Linux and others) translates bytecode instructions to OS instructions. That makes the code portable (“Write ones, run everywhere”).

(that’s the simplified answer ;-))