![]() |
Java program > application > compiler > javac |
![]() ![]() | ||||
javac | ||||
subject | fact |
javac | has documentation at Sun ![]() | ![]() |
has documentation at Sun ![]() | ![]() | |
has example of use javac Demonstrate.java | ![]() | |
is a subtopic of How Java Works | ![]() | |
is an instance of compiler | ![]() | |
is an instance of Java development tool | ![]() | |
to run you type javac and the source file name with its extension on the command line | ![]() | |
compiler |
| ![]() |
![]() | ||
![]() | ||
![]() | ||
![]() | ||
chooses a constructor based on the number of the actual arguments and the types of the actual arguments | ![]() | |
compiles source code into bytecode ![]() | ![]() | |
has purpose to translate source code written in Java into bytecode for the Java virtual machine | ![]() | |
puts compiled code into a class file with the same name as the source file but with extension .class | ![]() | |
Java development tool | has purpose to assist a programmer in preparing, debugging and executing Java programs | ![]() |
application | consists of one or more classes ![]() | ![]() |
contains one class that contains a main method which serves as the starting point for the rest of the program ![]() | ![]() | |
has example of running java HelloWorld ![]() | ![]() | |
has part 1 main method called its entry point | ![]() | |
is similar to an applet | ![]() | |
is run by using a Java interpreter to load the application's main class file - this is normally done from the command-line prompt using the java tool from the SDK | ![]() | |
Java program | can be compiled on any platform that has a Java compiler ![]() | ![]() |
can be run on any implementation of the Java Virtual Machine specification ![]() | ![]() | |
is portable because it is compiled into bytecode that can run on any computer with a Java Virtual Machine ![]() | ![]() | |
is usually slower than native code | ![]() | |
is executed by a Java Virtual Machine | ![]() | |
must be readable by humans | ![]() | |
runs on a Java platform | ![]() | |
should follow consistent guidelines that make the program easy to read | ![]() | |
to run you may need platform-specific instructions | ![]() |
Next compiler: JIT compiler Up: compiler, Java development tool