New to Java? We'll help you get started with our revised beginner's tutorial, or our free online textbook.

Get the latest Java books
h t t p : / /w w w . j a v a c o f f e e b r e a k . c o m /

Java Coffee Break


Learning Java

Author Profiles
Talk Java!

Using Java

Discuss Java

Looking for Java resources? Check out the Java Coffee Break directory!

Getting started with Java

"A beginner's guide to Java programming"

Running your first Java application

Now the time has come, (said the Walrus). You're ready to run your first Java application. From a dos prompt or Unix session, enter the directory where your source code and class file is stored, and type the following :

java myfirstjavaprog
Tip You should not type java myfirstjavaprog.class.  All Java classes end in this extension, it is not necessary, and will cause an error messages.


Your Java application will load, display its message, and then terminate. Congratulations!


Writing and developing Java applications and applets need not be a great mystery. Armed with the JDK and a text editor, virtually any programmer can write in Java. You've just taken the first step, in a long journey, towards learning Java.

Test your knowledge and take our Java quiz!

Print me!Want to print this article out, for offline reading? View it in single page format.

Back to main

Copyright 1998, 1999, 2000 David Reilly

Privacy | Legal | Linking | Advertise!

Last updated: Monday, June 05, 2006