answersLogoWhite

0


Best Answer

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.

User Avatar

Wiki User

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

Wiki User

13y ago

Compiling a java program is an action where the Java Compiler scans through a java program checking it for syntactical correctness and generates the byte-code (the system recognizable form) of the class so that the program can be executed.

Javac is the command that compiles a java class.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

When you compile a Java source file (.java) you get a Java bytecode file (.class). The bytecode in these .class files can be executed by the Java Virtual Machine.

This answer is:
User Avatar

User Avatar

Wiki User

10y ago

A Java compiler is a compiler for the Java programming language. A compiler translates programs written in the Java language and compiles them into bytecode class files.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What do you get when you compile a java program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the command to compile a java program named Greetingsjava?

The command to compile a Java program is "javac", followed by the class name (file name).


How do you compile and execute Java program in which we find the highest of any five numbers?

In the same way as you would compile and execute any other Java program. Compile: use the "javac" command. Or use the built-in "compile" command in your favorite IDE. Execute: Use the "java" command. Or use the built-in "run" command in your favorite IDE.


Once you have downloaded and installed the Java SE JDK Update 26 for Windows how do you open it-It shows up as a folder and it doesn't open java program when clicked on?

The Java Development Kit is not a program designed to be opened up and used, rather it is a folder of command line tools used to compile java programs. If you want to use a program to create/edit java code that automates the compiling process check out NetBeans or Eclipse. Also, if you are trying to open an already compiled java program with it, read the documentation that came with the java application on how to run it.


What are the different phases of java?

Based on the lecture i have , there are three JAVA PHASES -- editor. First step in creating java program is by writing ur programms in a text editor. Ex, notepad, emacs etc -- java compiler. compile. The program by. Using the java compiler. The output of this process is a file of java bytecodes wid the file extension.class -- java interpreter. The .class file is then interpreted by java interpreter that converts the bytecodes into the machine language of the particular computer your using ---abioo4---


How do you compile java programming language?

Hello Frnd, As u say u want to Compile & Run Java Prog. for This if U have JAVA CREATOR then u can compile directly otherwise........ goto Start >run type "cmd" Press "Enter"after that goto C>java>bin> type for compile the prog. "javac PROG.NAME.java" Press "Enter" if Compile SuccessFully Type "java PROG.NAME" Press "Enter" For It This Is Must u save ur Prog. in the folder "bin" in java............. Hello Frnd, As u say u want to Compile & Run Java Prog. for This if U have JAVA CREATOR then u can compile directly otherwise........ goto Start >run type "cmd" Press "Enter"after that goto C>java>bin> type for compile the prog. "javac PROG.NAME.java" Press "Enter" if Compile SuccessFully Type "java PROG.NAME" Press "Enter" For It This Is Must u save ur Prog. in the folder "bin" in java.............

Related questions

How do you run and compile a java applet program?

One can run and compile a Java applet program by agreeing to the terms and downloading it. It is possible to get a compiler online that will compile and run Java programs.


How do you make software from a simple java program?

You compile it.You compile it.You compile it.You compile it.


What is the command to compile a java program named Greetingsjava?

The command to compile a Java program is "javac", followed by the class name (file name).


Why it is required to set path and classpath?

to compile and run java program you need to set path and classpath path refers to binary used to compile and run java program i.e. "javac" for compilation and "java" for execution


What is the command to compile jre6 program?

It is 'Java program' to be precise, and the command is: 'javac sourcefilename.java'


How do you compile and execute Java program in which we find the highest of any five numbers?

In the same way as you would compile and execute any other Java program. Compile: use the "javac" command. Or use the built-in "compile" command in your favorite IDE. Execute: Use the "java" command. Or use the built-in "run" command in your favorite IDE.


What is Commands for the compiler that are needed to compile and run your program?

javac is the command that is used to compile Java source files.


It is not an error not to end a Java file name with the java extension?

If you want to compile a java program the name of that source code must end with extension .java


How do you compile and execute a java program which finds out the highest of any five numbers?

it will be destroyed.


How do you run the frames in java?

first compile java program using "javac" then run frame using "appletviewer". e.x. = appletviewer filename.java


How do you compile in java?

You either use the command-line program javac, for example: javac MyClass (assuming your program is called MyClass.java), or - more conveniently - look for the menu command to compile, in your favorite IDE.


Difference between a java complier and the Java JIT?

A java compiler takes Java source code and turns it into Java bytecode, which can then be run by the java virtual machine.Using JIT means that the java code will be compiled and executed at the time that you run the program, which will slow down the program because it has to compile the code at the same time that it runs.