Java | Java script | Java compiler

Asked By 0 points N/A Posted on -
qa-featured

What is the role of java compiler at the execution of the program ?

SHARE
Best Answer by Ace Baker
Best Answer
Best Answer
Answered By 5 points N/A #86704

Java | Java script | Java compiler

qa-featured

 

Hi Isha,
 
The role of the java compiler is very important when compiling your java files. The first thing that a java compiler does is that it converts your code into machine language because java is a third level programming language and your computer does not understand your code. So what your compiler does is it converts your code into a language that your computer can understand. The second function of your compiler is that it checks for any errors in your coding and tells you where those errors occurred.
 
Another function of your compiler is that it builds your executable file that you can run. Without your java compiler it would be very hard to check and start your programs.
 
Hope this helps.
 
Regards
Answered By 590495 points N/A #86705

Java | Java script | Java compiler

qa-featured

 

The compiler used in compiling java programming language is called a Java compiler. The most common form of output from a Java compiler is Java class files containing platform-neutral Java bytecode. There are also compilers emitting optimized native machine code for a particular hardware/operating system combination. Most Java-to-bytecode compilers do virtually no optimization, leaving this until run time to be done by the JRE.

The very first Java compiler developed by Sun Microsystems was written in C using some libraries from C++. The Java Virtual Machine [JVM] loads the class files and either interprets the bytecode or just-in-time compiles it to machine code and then possibly optimizes it using dynamic compilation.

Related Questions