简体   繁体   中英

Where does the jvm load the compiled java code?

After compilation of a business logic, the .class file is generated in our hard drive. My doubt is, when we execute the compiled code, it has to be loaded somewhere. What is that location?!

The .class file includes the instructions for the hardware and OS. the .class file is loaded into the JVM memory (RAM) before the execution of the program and is being handled there.

Compiled code to be executed by the Java Virtual Machine is represented using a hardware- and operating system-independent binary format, typically (but not necessarily) stored in a file, known as the class file format. The class file format precisely defines the representation of a class or interface, including details such as byte ordering that might be taken for granted in a platform-specific object file format.

Taken from: Chapter 2. The Structure of the Java Virtual Machine

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM