Java Tools Tutorials - Herong's Tutorial Examples - v6.24, by Herong Yang
Testing JDK Installation
This section describes how to compile and run Java programs to test JDK installation on Windows system.
When JDK is installed, it provides two commands for us to compile and run Java programs.
To try these commands, I used a text editor to enter the following Java program into a file called Hello.java:
class Hello { public static void main(String[] a) { System.out.println("Hello world!"); } }
Then compiled this program in a command window with the "javac" command:
herong> javac Hello.java
Finally, executed the program with the "java" command:
herong> java Hello Hello world!
Congratulations, I have successfully entered, compiled and executed our first Java program.
Table of Contents
Installing Latest JDK on macOS
Installing Latest JDK on Windows
Adding JDK "bin" Direcotry to Path Setting
javac - The Java Program Compiler
java - The Java Program Launcher
jpackage - Binary Package Builder
javadoc - The Java Document Generator
jdeps - The Java Class Dependency Analyzer
jdeprscan - The Java Deprecated API Scanner
jcmd - The JVM Diagnostic Tool
jconsole - Java Monitoring and Management Console
jstat - JVM Statistics Monitoring Tool
jhsdb - The Java HotSpot Debugger
jvisualvm (Java VisualVM) - JVM Visual Tool
javap - The Java Class File Disassembler
keytool - Public Key Certificate Tool
jrunscript - Script Code Shell
native2ascii - Native-to-ASCII Encoding Converter