Java compiler:
The programmer develops a program expressed in what is known as source code.This source code is translated by a compiler to the base language of the computer, known as native code. This is then executed and the program carries out its function.
There are strict rules governing the way source code can be written. If errors have been made, the compiler will not carry out the translation but will identify one or more compilation errors. It will issue a number of error messages to tell the programmer what has gone wrong.
This conventional way of implementing a programming language suffers from one problem - the end product is specific to just one type of computer. The native code that has been generated can be executed only by the particular type of computer that recognizes it.
In order to produce a portable implementation the developers of Java adopted the strategy shown in diagram.
In the case of Java, the compiler does not translate the source code to the native code of the computer but translates it into an intermediate form, known as bytecode.Thisisa language that is capable of being executed by any computer with a suitable interpreter.
The interpreter is a program that translates bytecode into the native code of the computer it runs on, so that it can be executed. Normally the effort in constructing a new interpreter is relatively small, and Java interpreters are available for many different platforms.
In diagram , the bytecode for the given Java source code is the same for the three distinct platforms A, B and C. However, there is a different interpreter for each platform A, B and C, so as to translate the bytecode into the appropriate native code for each platform.
This means that once a Java program has been compiled to bytecode it can, in theory, be sent to any computer that has a Java interpreter and run on that computer without any changes to the bytecode. This is the 'write once, run anywhere' philosophy promoted by Sun.
Java Assignment Help - Java Homework Help
Struggling with java programming language? Are you not finding solution for your Java compiler homework and assignments? Live Java compiler experts are working for students by solving their doubts & questions during their course studies and training program. We at Expertsmind.com offer Java compiler homework help, java assignment help and Java compiler projects help anytime from anywhere for 24x7 hours. Computer science programming assignments help making life easy for students.
Why Expertsmind for assignment help
- Higher degree holder and experienced experts network
- Punctuality and responsibility of work
- Quality solution with 100% plagiarism free answers
- Time on Delivery
- Privacy of information and details
- Excellence in solving java programming language queries in excels and word format.
- Best tutoring assistance 24x7 hours