esus
Home Up J++ 6.0 J++ 1.1 esus Sun's JDK

 

 

  1. Enter the above code into a file named HiWorld.java.  Since the name of the public class is HiWorld, the name of the file must be HiWorld.java
  2. To compile the file, type "javac HiWorld.java".   javac is the name of the Java compiler.  It translates your Java program into bytecode.  The bytecodes will be stored in a file called HiWorld.class.
  3. To run the file, type "java HiWorld".  java is the name of the Java interpreter.  It runs the bytecode produced in the previous step.