+ 4
What does a jvm do?
12 Respostas
+ 6
jvm means java virtual machine. when we compile a java program it converts it into some .class file extensions. These .class file contains some special character. So when we want to run a java file we need to run that .class file. So JVM helps in decoding that file into executable file. So you can run your java file in any computer if you have .class file and JVM compiler
+ 2
1.provide platform independent
2.translate bytecode to machine language
+ 1
JVM translates java code to machine language
+ 1
convert the byte code to machine specific code
+ 1
It creates a virtual machine to run java program, it means it make another machine which have its different components such as ram, processor etc.. By sharing the resources of your computer with the virtual machine because virtual machine is just a concept and it doesn't have any seperate real hardware. âș
+ 1
It interprets Java bytecode(stored in .class file) to enable computer's processor to execute a Java program's instructions(code written in .java file).
+ 1
It makes it possible to install and play Minecraft PC on your phone... if your clever enough to figure out the workaarounds
0
it reads .class file as its task is to interpret .class files which is converted from .java file by help of java compiler!
0
Java program execution follows 5 majors steps:
Edit
Compile
Load
Verify
and Execute
1. Edit - Here the programmer uses a simple editor or a notepad application to write the java program and in the end give it a .java extension
2. Compile - In this step the programmer gives the javac command and the .java files are converted into bytecode which is the language understood by the java virtual machine (and this is what makes java platform independent language). Any compile time errors are raised at this step
3. Load - The program is then loaded into memory. This is done by the class loader which takes the .class files containing the bytecode and stores it in the memory. The .class file can be loaded from your hard disk or from the network as well
4. Verify - the bytecode verifier checks if the bytecode loaded are valid and do not breach java's security restrictions
5. Execute - The JVM interprets the program one bytecode at a time and runs the program
0
first the code you create is compiled by the compiler and get converted into Java bytes and then JVM converts Java bytes to a machine understandable language
0
it's a decoder that decodes java class files into system programme files
- 4
it translates source code to byte code