FACTOID # 87: 22% of American women aged 20 gave birth while in their teens. In Switzerland and Japan, only 2% did so.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > GNU Compiler for Java

The GNU Compiler for Java (GCJ) is a free software compiler for the Java programming language that is part of the GNU Compiler Collection. It 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. Almost all of the runtime libraries used by GCJ come from the GNU Classpath project. This article is about Free Software as defined by the sociopolitical Free Software movement; for information on software distributed without charge, see freeware. ... A diagram of the operation of a typical multi-language compiler. ... Java is an object-oriented programming language developed by James Gosling and colleagues at Sun Microsystems in the early 1990s. ... The GNU Compiler Collection (usually shortened to GCC) is a set of programming language compilers produced by the GNU Project. ... Source code (commonly just source or code) is any series of statements written in some human-readable computer programming language. ... A Java Virtual Machine (JVM), originally developed by Sun Microsystems, is a virtual machine that executes Java bytecode. ... Byte-code is a sort of intermediate code that is more abstract than machine code. ... Machine code or machine language is a system of instructions and data directly understandable by a computers central processing unit. ... To a large extent, the design of a CPU, or central processing unit, is the design of its control unit. ... Class files contain bytecodes for the Java Virtual Machine. ... In computing, a Jar file (short for Java archive) is a ZIP file used to distribute a set of Java classes. ... Demonstration of the GNU Classpath Swing GNU Classpath is a project aiming to create a free implementation of the standard class library for the Java programming language. ...


Currently a lot of work has gone in to getting GNU Classpath to support Java's two graphical APIs: AWT and Swing. Full support for both AWT and Swing is close and it is likely that soon it will no longer be necessary to use the runtime provided by Sun Microsystems in order to run AWT/Swing applications. An application programming interface (API) is the interface that a computer system, library or application provides in order to allow requests for service to be made of it by other computer programs, and/or to allow data to be exchanged between them. ... The Abstract Windowing Toolkit (AWT) is Javas platform_independent windowing, graphics, and user_interface widget toolkit. ... Example Swing widgets Swing is a GUI toolkit for Java. ... Sun Microsystems, Inc. ...


CNI (Compiled Native Interface)

The Compiled Native Interface (CNI) is a software framework for the GCJ which 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++. This article needs cleanup. ... Java is an object-oriented programming language developed by James Gosling and colleagues at Sun Microsystems in the early 1990s. ... For a WikiBook on programming with C++, see Wikibooks: C++ Programming. ...


It is similar to the Java Native Interface (JNI) framework which comes as standard with various Java virtual machines. However the CNI authors claim various advantages over JNI: [1] The Java Native Interface (JNI) is a programming framework that allows Java code running in the Java virtual machine (VM) to call and be called by native applications (programs specific to a hardware and operating system platform) and libraries written in other languages, such as C, C++ and assembly. ... A Java Virtual Machine (JVM), originally developed by Sun Microsystems, is a virtual machine that executes Java bytecode. ...

We use CNI because we think it is a better solution, especially for a Java implementation that is based on the idea that Java is just another programming language that can be implemented using standard compilation techniques. Given that, and the idea that languages implemented using Gcc should be compatible where it makes sense, it follows that the Java calling convention should be as similar as practical to that used for other languages, especially C++, since we can think of Java as a subset of C++. CNI is just a set of helper functions and conventions built on the idea that C++ and Java have the *same* calling convention and object layout; they are binary compatible. (This is a simplification, but close enough.)

See also

Kaffe is a clean room design of the Java virtual machine. ... SableVM is a clean room implementation of Java bytecode interpreter implementing the Java virtual machine specification, second edition. ... In computing, a Java compiler is a computer program that translates programs in Java to Java byte-code. ...

External links

  • GCJ Homepage
  • GCJ Manual
  • About CNI section of GCJ Manual
  • GCJ Frequently Asked Questions

  Results from FactBites:
 
GNU Compiler for Java - Wikipedia, the free encyclopedia (361 words)
The GNU Compiler for Java (GCJ) is a free software compiler for the Java programming language that is part of the GNU Compiler Collection.
It can compile Java source code to either Java Virtual Machine bytecode, or directly to machine code for any of a number of CPU architectures.
The Compiled Native Interface (CNI) is a software framework for the GCJ which 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++.
Java bytecode - Wikipedia, the free encyclopedia (631 words)
It is possible to write Java bytecode in hand, however this method is never used in real life because nowadays the compilers are able to compile well performing code and no person is able to comprehend a piece of Java bytecode of considerable size.
Gnu Compiler for Java, GCJ, compiles from the Java programming language to Java bytecode, is also able to compile to native machine code.
If executing Java bytecode in a Java virtual machine is not desirable, a developer can also compile Java source code or Java bytecode directly to native machine code with tools such as the GNU Compiler for Java.
  More results at FactBites »


 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m