![]() Thus, it is in the JVM where your code results, if needed, in native Operating System calls. It can also compile it into native code with a JIT (a just-in-time compiler that compiles and caches your code, usually one method at a time). The JVM takes your compiled platform-neutral byte code and interprets it to run platform-specific machine code. It is the JVMs responsibility that makes it possible for the same class file to run on any other Operating Systems. When you issue a command like java, the JVM loads the class definition for that particular class and calls the main method of that class. It is the JVM's responsibility to load your class files, verify code, interpret them and execute them. When you run a Java program, it runs as a thread within the JVM process. In most cases, other programming languages, the compiler produce code for a particular Operating System but the Java compiler produce Bytecode only for a Java Virtual Machine. ![]() ![]() ![]() JVM makes this possible because it is aware of the specific instruction lengths and other particularities of the platform. ![]() Java's platform independence consists mostly of its Java Virtual Machine (JVM). As the name implies, the JVM acts as a “virtual” machine or processor. Java Virtual Machine (JVM) is a specification that provides runtime environment in which java bytecode can be executed. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |