Date post: | 20-Dec-2015 |
Category: |
Documents |
View: | 234 times |
Download: | 2 times |
6
Installation - Installation - check whether you check whether you have installed java and javac have installed java and javac
7
Set the path to include the directory Set the path to include the directory
Test it by typing javac in other directory
8
JDK componentsJDK components• appletviewer.exe applet viewer• java.exe intepreter• javac.exe compiler• javadoc.exe document generator
• javap.exe deassembler• jdb.exe debugger
11
Explanation to the first programExplanation to the first program• Class: First is the name of class. It will
generate a First.class after compilation (javac)
• Public: is an access specifier that allows the programmer to control
• Main(): must be declared as public so that it can be accessed.
• String args[]: argv[0] is the first argument• System.out.println: Display the contents
followed by a line feed
14
Javadoc.exeJavadoc.exe
• Javadoc is a tool shipped with JDK that generates HTML documentation from the comments in the class source files.
• With the aid of Javadoc we can simplify documentation of our code and make it a regular habit.
16
Javap - explanationJavap - explanation• The javap
command disassembles a class file.
• Its output depends on the options used. If no options are used, javap prints out the package.
18
Jdb - explanationJdb - explanation• The Java Debugger, jdb, is a simple
command-line debugger for Java classes.
• It provides inspection and debugging of a local or remote Java Virtual Machine.
• Jdb class format