answersLogoWhite

0

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.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

How many bytes does a Java VM have?

A JVM, or Java Virtual Machine, creates the environment in which programs that run using Java bytecode are processed. It does not itself possess bytes or bytecode.


What does the byte code run on?

Bytecode runs on a virtual machine, which interprets or compiles it into machine code that can be executed by the underlying hardware. For example, Java bytecode runs on the Java Virtual Machine (JVM), while Python bytecode runs on the Python interpreter. This abstraction allows for platform independence, enabling the same bytecode to run on different systems without modification.


Java is both compiled and interpreted language meaning?

Instead of compiling to machine language, the Java compiler compiles for a "ficticious processor". A program called the Java Virtual Machine then interprets this on every machine. To learn this java course techpragna is the best institute in bangalore


Why java interpreted?

Java is both compiled and interpreted. At first, the Java source code (in .java files) is compiled into the so-called Bytecode (.class files). The Bytecode is a pre-compiled, platform independent version of your program. The .class files can be used on any operating system. When the Java application is started, the Bytecode is interpreted by the Java Virtual Mashine. Because the Bytecode is pre-compiled, Java does not have the disadvantages of classical interpreted languages, like BASIC.


Why java has compiler and interpreter both?

Java is both compiled and interpreted language.First Java source code has to be translated into Byte code, which is done with the help of a compiler.But these byte codes are not machine instructions. Therefore ,in second stage this byte code has to be translated into machine code.This task is performed by an Interpreter.Hence, Java use both compiler and interpreter.

Related Questions

How many bytes does a Java VM have?

A JVM, or Java Virtual Machine, creates the environment in which programs that run using Java bytecode are processed. It does not itself possess bytes or bytecode.


What does the byte code run on?

Bytecode runs on a virtual machine, which interprets or compiles it into machine code that can be executed by the underlying hardware. For example, Java bytecode runs on the Java Virtual Machine (JVM), while Python bytecode runs on the Python interpreter. This abstraction allows for platform independence, enabling the same bytecode to run on different systems without modification.


Does the bytecode is different for every processor?

No, Java bytecode, just like the source code, is universal. The only parts that changes between different architectures are the Java Runtime Environment and its sub-components (such as the Java Virtual Machine).


Java is both compiled and interpreted language meaning?

Instead of compiling to machine language, the Java compiler compiles for a "ficticious processor". A program called the Java Virtual Machine then interprets this on every machine. To learn this java course techpragna is the best institute in bangalore


What type of file is created by Java?

Java created a file called class, and is identified by having the .class at the end. This file includes a Java bytecode, which then can be used on the Java Virtual Machine.


What do you mean by java virtual machine explain?

A Java Virtual Machine enables a set of computer software programs and data structures to use a virtual machine model for the execution of other computer programs and scripts. The model used by a JVM accepts a form of computer intermediate language commonly referred to as Java bytecode. A virtual machine is a software implementation of a machine (i.e. a computer) that executes instructions (not programs) like a physical machine.


Why java interpreted?

Java is both compiled and interpreted. At first, the Java source code (in .java files) is compiled into the so-called Bytecode (.class files). The Bytecode is a pre-compiled, platform independent version of your program. The .class files can be used on any operating system. When the Java application is started, the Bytecode is interpreted by the Java Virtual Mashine. Because the Bytecode is pre-compiled, Java does not have the disadvantages of classical interpreted languages, like BASIC.


Why java has compiler and interpreter both?

Java is both compiled and interpreted language.First Java source code has to be translated into Byte code, which is done with the help of a compiler.But these byte codes are not machine instructions. Therefore ,in second stage this byte code has to be translated into machine code.This task is performed by an Interpreter.Hence, Java use both compiler and interpreter.


Is MSIL similar to java byte code?

Yes, in some way it's similar. One difference is that Java Bytecode is typically interpreted by the virtual machine, while MSIL is JIT-compiled to native machine code before executing. However, it is increasingly common for bytecode to be compiled as well.


Is it possible to run java program without JVM?

No. Java programs run in the Java Virtual Machine (JVM) - without it your computer won't know how to handle Java bytecode.


Why java called platform indeependent?

Platform independent language means once compiled you can execute the program on any platform (OS). Java is platform independent. Because the Java compiler converts the source code to bytecode, which is Intermidiate Language. Bytecode can be executed on any platform (OS) using JVM( Java Virtual Machine).


What is the software that interprets Java bytecode?

The software that interprets Java bytecode is known as the Java Virtual Machine (JVM). The JVM executes the bytecode generated by the Java compiler, allowing Java applications to run on any platform that has a compatible JVM installed. This platform independence is a key feature of Java, enabling the "write once, run anywhere" capability. Additionally, the JVM also provides features like memory management and garbage collection.


What is a bytecode?

In Java, "bytecode" is the name given to the compiled class files. The "compilation" in this case is not for a specific processor, but rather for a kind of fictional processor - and it is meant to be run by a Java Virtual Machine.


What do you get when you compile a java program?

The java interpreter or JVM (Java Virtual Machine) is not able to execute the java source code for a program. The java source code first needs to be compiled into bytecode that can be processed by JVM. Producing bytecode make the program platform independent as each platform has its own JVM. It is also possible to directly write bytecode, bypassing the need to compile, but that would be tedious job and also not good for security purpose as the compiler checks for various errors in a program.


What type of java used in java enable phone?

J2ME - Java 2 Micro Edition is generally used in java enabled phones. Simple Java Applications use JVM(Java Virtual Machine) for generating bytecode where as Java Mobile Applications use KVM(KiloByte Virtual Machine) for the same purpose. Reason for this is KVM occupies small amount of memory and hence can be embedded inside a java enabled phone easily.


What do you call a Program that runs Java byte code instruction?

Get the JDK & Bluej from net and the rest will be done by them. Java byte codes are stored as *.class ; where "*" represents the class name, in your hard disk. You can download BlueJ as well as JDK from the related link.


What is meant by JVM in applets?

Answer: JVM is nothing but java virtual machine,it is a software used to convert the bytecode(highly optimizes set of instructions) to machine code. so, now applet is a small java program run by a web browser.thus now we can understand for what JVM is used or mean in applets.Answer: In other words, JVM (Java virtual machine) is simply the component used to run software written in the Java language.


What is the primary benefit of byte code?

The whole idea of Java - or one of the ideas, at any rate - is that it can be run anywhere. So, instead of compiling for a specific processor, the Java compiler compiles for a "generic processor", called the Java Virtual Machine. The code thus generated is called "bytecode". It can be interpreted (i.e., run) by a Java Virtual machine, these are available on different platforms.The whole idea of Java - or one of the ideas, at any rate - is that it can be run anywhere. So, instead of compiling for a specific processor, the Java compiler compiles for a "generic processor", called the Java Virtual Machine. The code thus generated is called "bytecode". It can be interpreted (i.e., run) by a Java Virtual machine, these are available on different platforms.The whole idea of Java - or one of the ideas, at any rate - is that it can be run anywhere. So, instead of compiling for a specific processor, the Java compiler compiles for a "generic processor", called the Java Virtual Machine. The code thus generated is called "bytecode". It can be interpreted (i.e., run) by a Java Virtual machine, these are available on different platforms.The whole idea of Java - or one of the ideas, at any rate - is that it can be run anywhere. So, instead of compiling for a specific processor, the Java compiler compiles for a "generic processor", called the Java Virtual Machine. The code thus generated is called "bytecode". It can be interpreted (i.e., run) by a Java Virtual machine, these are available on different platforms.


What is the virtual machine system?

Java virtual machine


What translates a Java program into Bytecode?

The Java Runtime Environment (JRE) converts the byte code to machine language.