Java compiler From Wikipedia, the free encyclopedia A Java compiler is a compiler for the Java programming language

. The most common form of output from a Java compiler is Java class files containing platform-neutral Java bytecode. There exist also compilers emitting optimized native machine code for a particular hardware/operating system combination. Most Java-to-bytecode compilers, Jikes being a well known exception, do virtually no optimization, leaving this until run time to be done by the JRE[citation needed]. 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. The very first Java compiler developed by Sun Microsystems was written in C using some libraries from C++.[citation
needed]

[edit] Major Java compilers As of 2010, the following are major Java compilers:

• • •

javac, included in JDK from Sun Microsystems, open-sourced since 13 November 2006. GNU Compiler for Java, a part of the GNU Compiler Collection, which compiles C, Fortran, Pascal and other programming languages besides Java. It can also generate native code using the back-end of GCC. ECJ, the Eclipse Compiler for Java, is an open source incremental compiler used by the Eclipse project.


Java compiler Refers to software that converts a Java source program into bytecode (intermediate language) or to a just-in-time (JIT) compiler that converts bytecode into intermediate language. It may also refer to compiling the source code into the native language of a particular hardware platform, which makes it hardware dependent. See Java Virtual Machine and Java.

the free encyclopedia GNU Compiler for Java Developer(s) Operating system The GNU Project Unix-like .GNU Compiler for Java From Wikipedia.

[5] [edit] CNI (Compiled Native Interface) The CNI (Compiled Native Interface.org/java The GNU Compiler for Java (GCJ or gcj) is a free software compiler for the Java programming language and a part of the GNU Compiler Collection. GCJ can compile Java source code to either Java Virtual Machine bytecode. or directly to machine code for any of a number of CPU architectures. It can also compile class files containing bytecode or entire JARs containing such files into machine code. the compiled program may or may not surpass JVM performance. after which support for Swing will follow. Contents [hide] • • • • • • 1 History 2 Performance 3 CNI (Compiled Native Interface) 4 See also 5 References 6 External links [edit] History Almost all of the runtime-libraries used by gcj come from the GNU Classpath project (but compare the libgcj library). . Work on supporting AWT is ongoing. As of gcj 4. [edit] Performance Java code compiled into machine code by GCJ should have faster start-up time than the equivalent bytecode launched in a JVM. a software framework for the gcj. the Eclipse Compiler for Java. in this case. previously Cygnus Native Interface).[2] As of 2009 there have been no new developments announced from gcj.[1] As of 2007 a lot of work has gone in to getting GNU Classpath to support Java's two graphical APIs: AWT and Swing.3. This is true even when GCJ is invoked with advanced optimization options such as -fno-bounds-check -O3 -mfpmath=sse -msse2 -ffast-math -march=native. gcj integrates with ecj. Java code compiled by GCJ does not necessarily execute any faster than bytecode executed by a modern JIT-enabled JVM.[3] The product is currently in maintenance mode. allows Java code to call and be called by native applications (programs specific to a hardware and operating-system platform) and libraries written in C++. after start-up.gnu.Type License Website Compiler GNU GPL http://gcc.[4] However. depending on the operations performed by the code in question.

However the CNI authors claim various advantages over JNI:[6] CNI depends on Java classes appearing as C++ classes. public Int(int i) { this. public class Int { public int i.CNI closely resembles the Java Native Interface (JNI) framework which comes as standard with various Java virtual machines. int k) { if (k == 0) return Int::zero.[7] given a Java class. } one can use the class thus: #include <gcj/cni.h> #include <Int> Int *mult(Int *p. } .i = i. // Static member access. } public static Int zero = new Int(0). return new Int(p->i * k). For example.

Sign up to vote on this title
UsefulNot useful