3.5.3 Running the application

Previous Index Next 


Now that the we have compiled the code we are ready to execute it. The java command is used invoke the Java VM. This command accepts the class name to execute as a parameter.

Move to the directory containing HelloWorld.class and execute the following command:

java HelloWorld

If the run is successful you should see the following on the screen:

Hello World !

Congratulations you have just successfully written and run your first Java application.