problem with compiling on a mac terminal

Hi , i am new to java ( know c++ ) and im begining to learn java , i am using mac os x terminal and i got this code from a tutorial:

class myfirstjavaprog

{

public static void main(String args[])

{

System.out.println("Hello World");

}

}

i saved it as hellowworld.java

then i did the folowing things:

javac hellowworld.java (it worked fine)

and then i did java hellowworld ( as the tutorial says) and i get the folowing error messege :

exception in thread "main" java.lang.NoClassDeFoundError: hellowworld

thanks for reading and hope you can help me !

sincerly Kil

[656 byte] By [kilmuntad] at [2007-9-30 18:27:52]
# 1

The cause of the error is an incorrectly set (or not set) classpath. To eliminate it,

change to the directory that contains your hellowworld.class file that was created when you used the javac command.

Issue this command, including the dot (period) and spaces:

java -classpath . hellowworld

Go to this page and read about the classpath. You will have to know what it is, what it does, and how to use it to program with Java.

http://java.sun.com/j2se/1.4.2/docs/tooldocs/tools.html

ChuckBing at 2007-7-6 20:07:32 > top of Java-index,Administration Tools,Sun Connection...
# 2
you must save the file asmyfirstjavaprog.java
dearli.abc at 2007-7-6 20:07:33 > top of Java-index,Administration Tools,Sun Connection...
# 3
> you must save the file asmyfirstjavaprog.javaNot so - any name is fine so long as you use the extension java, and respect the case of the name (upper/lower).
ChuckBing at 2007-7-6 20:07:33 > top of Java-index,Administration Tools,Sun Connection...