The JVM plays an important role in making Java language portable and platform-independent as it hides the details of implementation betwe...
The JVM plays an important role in making Java language portable and platform-independent as it hides the details of implementation between the hardware requirement and the operating system. JVM runs the compiled Java programs and provides compatibility between the compiled Java program and the system, where the program is executed.
Java programs are compiled into calls using the executable file, javac. A Java compiler generates the byte code and loads it in JVM using the JVM class loaders. The JVM class loaders load the class file and execute the byte code in accordance with the operating system and the hardware configuration. JVM allows you to execute a Java program an any operating system such as UNIX system, Windows system of Macintosh system,
Java programs are compiled into calls using the executable file, javac. A Java compiler generates the byte code and loads it in JVM using the JVM class loaders. The JVM class loaders load the class file and execute the byte code in accordance with the operating system and the hardware configuration. JVM allows you to execute a Java program an any operating system such as UNIX system, Windows system of Macintosh system,
Pigure ; The Java interpreter executes the byte code that are generated by a Java compiler and converts the byte codes into machine-readable code.
The class loaders in JVM allocate memory to the loaded Java class file. Class loaders also provide mobility to the Java programs as these class loaders allow the source code to de dynamically linked across the network. Class loaders also provide network security to the Java programs.
The class loaders in JVM are of two types: primordial class loader the Java Application Programming Interface (API) at the time of executing a Java program. You can instantiate multiple class loader. during run-time to load the class files in machine memory.
The Java class files obtained after compilation are loaded into JVM using the Java class loaders. The Java API class files are also loaded in the class loader of JVM. The execution engine interacts with the host operating system by invoking the native method while executing a program on JVM. The two ways by which you can invoke native methods are Java method and Native method.
The native methods are written in a non-Java programming language such as C++ or assembly language and are compiled into the native machine code. The native methods are plarform-dependent and are stored in Dynamic Linked Libraries (DLLs).
No comments