Home : Course Map : Chapter 1 : Java : Supplements :
Java Compilers
Course Map
Chapter 1
What is Java?
Java 5.0

Java Process
Getting Started
Simple Applet
Simple Application


Making WebPages
Java 5.0 Features
Advanced JVMs
Alt. Compilers
Alt. JVMs
Java Deployment

     About JavaTech
     Codes List
     Topic Index
     Course Guide
     What's New

The Java Virtual Machine only knows Java bytecode. A JVM doesn't care what program produced the byte code. The byte code could come from the Sun javac compiler but there are other compilers that produce standard bytecode as well.

There are a number of possible motivations for using an independently written compiler:

  • There may not be a Sun compiler available for a particular platform.
  • javac is written in Java and may run slower than a compiler written in C/C++.
  • The alternative compiler may have optimization capabilities superior to Sun's compiler, at least for the JVM and the platform that you plan to use.
  • The compiler might have particular features that you like, such as producing clear and informative error messages.
  • The compiler could be part of a popular IDE.
  • Native code compilers convert the source code directly to the machine code for a particular platform. This provides high performance for that machine, but, of course, it eliminates the transportability aspect of Java programs and dynamic binding of new classes.

Here is a list of some Java compilers:

  • javac - Sun's compiler is written in Java itself. Available for a wide range of platforms. Comes with the freeware JDK package of programs. Available at java.sun.com.

  • Jikes - open source freeware compiler. It strictly follows the Java Language and the JVM specifications. It is written in C++ and runs fast and so is useful for large code projects. It also " performs a dependency analysis on your code that provides two very useful features: incremental builds and makefile generation." More information and downloads available at IBM Developerworks.

  • Kopi - "a Java software project from DMS, providing a development environment for database applications using Java, JDBC and JFC/Swing." Available at the Kopi Project.

  • Lists of other compilers can be found at:

Note that the bytecode, in fact, could come form a non-Java source code. That is, the source code might be in C++ source code and a C++ to Java compiler will produce byte code that executes in a standard JVM.

See Programming Languages for the Java Virtual Machine - Robert Tolksdorf for information about generating Java bytecode from languages other than Java.


Latest update: Dec.10.2003

Java in Science
    & Engineering
RealWorld Examples

Java in Physics
Sim. in Experiments
  Demo 1: Event
  Demo 2: Continuous
  Demo 3: Static

Learn by Coding

  Part I Part II Part III
Java Core 1  2  3  4  5  6  7  8  9  10  11  12 13 14 15 16 17
18 19 20
22 23 24

1  2  3  4  5  6  7  8  9  10  11  12

Tech 1  2  3  4  5  6  7  8  9  10  11  12
Physics 1  2  3  4  5  6  7  8  9  10  11  12

Java is a trademark of Sun Microsystems, Inc.