Java Bytecode - Generation

Generation

The most common language targeting Java Virtual Machine by producing Java bytecode is Java. Originally only one compiler existed, the javac compiler from Sun Microsystems, which compiles Java source code to Java bytecode; but because all the specifications for Java bytecode are now available, other parties have supplied compilers that produce Java bytecode. Examples of other compilers include:

  • Jikes, compiles from Java to Java bytecode (developed by IBM, implemented in C++)
  • Espresso, compiles from Java to Java bytecode (Java 1.0 only)
  • GCJ, the GNU Compiler for Java, compiles from Java to Java bytecode; it is also able to compile to native machine code and is available as part of the GNU Compiler Collection (GCC).

Some projects provide Java assemblers to enable writing Java bytecode by hand. Assembly code may be also generated by machine, for example by compiler targeting Java virtual machine. Notable Java assemblers include:

  • Jasmin, takes textual descriptions for Java classes, written in a simple assembly-like syntax using Java Virtual Machine instruction set and generates a Java class file
  • Jamaica, a macro assembly language for the Java virtual machine. Java syntax is used for class or interface definition. Method bodies are specified using bytecode instructions.

Others have developed compilers, for different programming languages, in order to target the Java virtual machine, such as:

  • JRuby and Jython, two scripting languages based on Ruby and Python
  • Groovy, a scripting language based on Java
  • Scala, a type-safe general-purpose programming language supporting object-oriented and functional programming
  • JGNAT and AppletMagic, compile from the Ada programming language to Java bytecode
  • C to Java byte-code compilers
  • Clojure
  • MIDletPascal
  • JavaFX Script code is also compiled to Java bytecode.

Read more about this topic:  Java Bytecode

Famous quotes containing the word generation:

    ... the generation of the 20’s was truly secular in that it still knew its theology and its varieties of religious experience. We are post-secular, inventing new faiths, without any sense of organizing truths. The truths we accept are so multiple that honesty becomes little more than a strategy by which you manage your tendencies toward duplicity.
    Ann Douglas (b. 1942)

    Every generation rewrites the past. In easy times history is more or less of an ornamental art, but in times of danger we are driven to the written record by a pressing need to find answers to the riddles of today.... In times of change and danger when there is a quicksand of fear under men’s reasoning, a sense of continuity with generations gone before can stretch like a lifeline across the scary present and get us past that idiot delusion of the exceptional Now that blocks good thinking.
    John Dos Passos (1896–1970)

    Could it be that those who were reared in the postwar years really were spoiled, as we used to hear? Did a child-centered generation, raised in depression and war, produce a self-centered generation that resents children and parenthood?
    C. John Sommerville (20th century)