Thursday, December 21, 2006

Interpreter

An interpreter is a type of translating program which converts high level language into machine code. It translates one statement of high level language into machine code, then executes the resulting machine code, then translates the next instruction of high level language, executes it, and so on. It never translates the whole program of high level language at one time.
During interpretation, the HLL (high level language) program remains in the source form itself (or in some intermediate form), and the actions implied by it are performed by the interpreter.
The advantage of interpretation is that it eliminates the overhead of program translation

Compilers

A compiler is a computer program (or set of programs) that translates text written in a computer language (the source language) into another computer language (the target language). The original sequence is usually called the source code and the output called object code. Commonly the output has a form suitable for processing by other programs (e.g., a linker), but it may be a human readable text file.

The name "compiler" is primarily used for programs that translate source code from a high level language to a lower level language (e.g., assembly language or machine language). A program that translates from a low level language to a higher level one is a decompiler

Difference between JDK & JRE

JRE is Java Run Time Environment. The java programming language adds the portability by converting the source code to byte code version which can be interpreted by the JRE and gets converted to the platform specific executable ones. Thus for different platforms one has corresponding implementation of JRE. But JRE has to meet the specification JVM (Java Virtual Machine) Concept that serves as a link between the Java libraries and the platform specific implementation of JRE. Thus JVM helps in the abstraction of inner implementation from the programmers who make use of libraries for their programmes.

The JDK(Java Developmental Tool kit) comes along with java libraries and JVM embedded in it. Apart from these it comes along with the utility tools for byte code compilation "javac", Executing the byte codes through java programmes through "java" and many more utilities found in the binary directory of java. Speaking practically JDK is essential for developers, which comes along with library packages to develop Software programmes. While JRE is minimal set of programmes which executes the java class files developed by the software developers