answersLogoWhite

0

Can the Java Virtual Machine execute only Java byte code?

Updated: 8/18/2019
User Avatar

Wiki User

8y ago

Best Answer

Yes. Note, however, that does not limit the language in which a program is written to Java. There are a number of languages designed to run in the JVM and the number is growing. See https://en.wikipedia.org/wiki/List_of_JVM_languagesfor reference.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

8y ago

No it can execute almost any byte code it is given not just Java

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can the Java Virtual Machine execute only Java byte code?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the content of java byte code?

It is partial with opcode and processor code. It is meaningless when we see it on our eyes, but it provides info instructions to Java Virtual Machine to execute that.


What is BYTE Code in java?

Java byte code is the code that is output by the Java compiler. Byte code is not machine code, it must be interpreted to create the machine code. This is handled by the Java virtual machine. Pretty much every platform produced today has a Java virtual machine implementation, so the same byte code can be executed upon any machine. Byte code can be regarded as being the native language of the virtual machine, as opposed to machine code which is the native language of the physical machine.


How is java byte code is different from other low level language?

Java byte-code is the code which generate after the compilation of .java file.And this code is only understand by JVM(java virtual machine ) which understand it and execute it.In other languages this type of functionality is not available.


How does VM code compiler works?

The Java virtual machine is not a compiler, it is an interpreter which primarily performs runtime-translation of Java byte code (the native language of the Java virtual machine) to machine-code (the native language of the physical machine). The Java compiler, on the other hand, is a separate program used to perform compile-time conversion of high-level Java source code to the lower level byte code. Java byte code is highly portable; once compiled, any architecture or platform that implements a JVM can execute the byte code without modification.


Which software runs a specific program?

It depends on which specific program you have in mind. Native machine code programs do not require any software to run; the program was converted into the machine's native language during compilation and does not require further translation. However, machine code is non-portable. To execute the same program on another platform the source code must be recompiled for that platform. Conditional compilation directives ensure that the correct machine-specific source code is compiled. Byte code programs, however, do require software to execute. Byte code is not native machine code so must be converted to native machine code while it is executing. This is achieved using a runtime program known as an interpreter. Java is a typical example. Java source code is compiled to Java byte code suitable for interpretation by the Java virtual machine (JVM). Thus a JVM is required to execute Java programs. Unlike native machine code, byte code is portable; the same byte code will execute upon any machine that has a suitable interpreter available.


Which software runs specific program.?

It depends on which specific program you have in mind. Native machine code programs do not require any software to run; the program was converted into the machine's native language during compilation and does not require further translation. However, machine code is non-portable. To execute the same program on another platform the source code must be recompiled for that platform. Conditional compilation directives ensure that the correct machine-specific source code is compiled. Byte code programs, however, do require software to execute. Byte code is not native machine code so must be converted to native machine code while it is executing. This is achieved using a runtime program known as an interpreter. Java is a typical example. Java source code is compiled to Java byte code suitable for interpretation by the Java virtual machine (JVM). Thus a JVM is required to execute Java programs. Unlike native machine code, byte code is portable; the same byte code will execute upon any machine that has a suitable interpreter available.


What is bytecode and java virtual machine in java?

A traditional compiler compiles the source code to machine language. Java compiles for a "ficticious CPU", not for a specific CPU (processor). The compiled code is called "bytecode" (technically, any information stored on a computer is made up of bytes!). To run the program, this bytecode is interpreted by the Java Virtual Machine.


Why it is not possible to execute java program on machine which does not have JVM installed on it?

when a java program is compiled it is converted into a non executable code which is byte code, and this byte code can only be interpreted by JVM. so a java program can't be executed on a machine which doesn't have JVM installed on it.


What is Java byte-code level language?

Java byte-code is the code which generate after the compilation of .java file.And this code is only understand by JVM(java virtual machine ) which understand it and execute it.In other languages this type of functionality is not available.


What kinds of differences are compiling and running Java vs C programs?

Although Java is often described as a compiled language, it is a language that is both compiled and interpreted. Unlike C++ which typically compiles to native machine code, Java compiles to Java byte code, the native language of the Java virtual machine. The key difference here is that the Java virtual machine is not machine dependent, thus the same byte code can be executed upon any physical machine with a suitable Java virtual machine implementation; it is highly portable. Machine code can only be executed upon the machine architecture for which it was compiled. To support other architectures, the source code must be recompiled for those architectures. In terms of execution, native machine code requires no further translation and can be executed as soon as the code is compiled successfully (including any and all shared libraries required by the executable). Java byte code requires that the Java virtual machine be memory-resident during execution as the byte code must be interpreted to produce native machine code while the byte code is executing within the virtual machine. In terms of memory consumption, C++ programs require no additional memory over and above the program's requirements. Java programs require additional memory for the Java virtual machine runtime. Java programs also consume additional memory to assist in memory management, such as automatic garbage collection. C++ programs manage their own memory using resource handles and smart pointers; the use of a garbage collector is optional. In terms of performance, C++ programs execute many times more quickly than equivalent Java programs due to Java's need to interpret the byte code.


What does a compiler perform?

A compiler converts high-level source code into native machine. In the case of Java, source code is compiled to Java byte code suitable for interpretation by the Java virtual machine which produces the machine code.


What is contain inside the jar file?

.jar files contain byte-code compiled to run on the Java Virtual Machine.