javac
{{Short description|Java compiler}}
{{about|Oracle's Java compiler|a general article about Java compilers|Java compiler}}
{{lowercase|title=javac}}
{{Infobox software
| name = javac
| caption = Java Compiler
| developer =
| latest release version =
| latest release date =
| programming language = Java{{cite web
|url=http://www.lextrait.com/Vincent/implementations.html
|title=The Programming Languages Beacon, v10.0
|first=Vincent
|last=Lextrait
|date=January 2010
|accessdate=14 March 2010
|url-status=dead
|archiveurl=https://archive.today/20120530/http://www.lextrait.com/Vincent/implementations.html
|archivedate=30 May 2012
}}
| operating system = Cross-platform
| genre = Compiler
| license = GNU General Public License
| website = {{URL|http://www.oracle.com/technetwork/java/javase/downloads/index.html}}
}}
javac (pronounced "java-see") is the primary Java compiler included in the Java Development Kit (JDK) from Oracle Corporation. Martin Odersky implemented the GJ compiler, and his implementation became the basis for javac.{{cite web
|url=https://docs.oracle.com/javase/specs/jls/se7/html/jls-0-preface3.html
|title=Preface to Java Generics
}}
The compiler accepts source code conforming to the Java language specification (JLS) and produces Java bytecode conforming to the Java Virtual Machine Specification (JVMS).
javac
is itself written in Java. The compiler can also be invoked programmatically.{{cite web
|last1=Silverman |first1=Shawn
|date=2002-08-30 |df=dmy
|url=https://www.infoworld.com/article/2077497/java-tip-131--make-a-statement-with-javac-.html
|title=Java Tip 131: Make a statement with javac!
|work=JavaWorld
|accessdate=2020-07-14
|quote=[...]an application can access javac programmatically.
}}
History
On 13 November 2006, Sun's HotSpot Java virtual machine (JVM) and Java Development Kit (JDK) were made available{{cite web |title=Sun opens Java (feature story) |publisher=Sun Microsystems, Inc. |website=sun.com |date=13 November 2006 |url=http://www.sun.com/2006-1113/feature/story.jsp |url-status=dead |archive-url=https://web.archive.org/web/20070105195350/http://www.sun.com/2006-1113/feature/story.jsp |archive-date=5 January 2007}} under the GPL license.[https://wiki.openjdk.java.net/display/HotSpot/Main Sun's OpenJDK Hotspot page]
Since version 0.95, GNU Classpath, a free implementation of the Java Class Library, supports compiling and running javac using the Classpath runtime — GNU Interpreter for Java (GIJ) — and compiler — GNU Compiler for Java (GCJ) — and also allows one to compile the GNU Classpath class library, tools and examples with javac itself.
"This release supports compiling and running the GPL OpenJDK javac compiler[...]" site visit (narrow);
open slide(
{{cite web
|url=https://www.gnu.org/software/classpath/announce/20070423.html
|title=GNU Classpath 0.95 Announcement
}}
See also
{{Portal|Free and open-source software|Computer programming}}
- Java compiler – for a general presentation of Java compilers, and a list of other existing alternative compilers.
- Java Platform
- OpenJDK
References
{{Reflist}}
External links
- [http://openjdk.java.net/groups/compiler/ The Compiler Group]
- [http://www.jcp.org/en/jsr/detail?id=199 JSR 199] Java Compiler API Java Specification Request for invoking the Java compiler from a Java program
- [http://hg.openjdk.java.net/ Mercurial repository]
- [http://docs.oracle.com/javase/specs/jls/se7/html/index.html Java Language Specification]