Top
Previous Next
Elements of the Java Platform CS 161 - Java

Running a Java application

  1. Write Java code in a source file using a text editor.

  2. Activate the Java compiler; For example, by typing
     javac MyName.java
    

    This converts your human readable Java source code to Java interpreter readable bytecode.

  3. Run the program; activate the Java interpreter
    For example, by typing
     java ClassWithMain
    
    ClassWithName must be identical to filename and is case sensitive. For example:
     C:\ java MyName "Your name here"
    

    This starts the interpreter and tells it to look for a file MyName.class


  4. Top
    Previous Next
    jwd