O'Reilly logo

Java™ Phrasebook by Timothy Fisher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Compiling a Java Program

javac HelloWorld.java

In this phrase, we compile the HelloWorld.java source file to bytecode. Bytecode is Java’s platform-independent representation of a program’s instructions. The output will be placed in the HelloWorld.class file.

The javac executable is included with the Java JDK distribution. This javac program is used to compile the Java source files that you write into Java class files. A java class file is a bytecode representation of the compiled java source. For more complete information about the javac command, be sure to see the JDK documentation. There are many options you can use with javac that are not covered in this book.

For most programming projects, other than very small and simple programs, you will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required