Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Hello World! on Linux(Ubuntu)

807599Mar 28 2007 — edited Mar 29 2007
I just checked out the official tutorial and tried it out in Pico and then compiled it. Everything was going great until I tried to run it from the command line. It gave me the :

Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp

I tried doing the
unset CLASSPATH
to correct this but it still didn't work. I have it set to the correct directory where the class is soo..not sure where I'm going wrong. Here is what I have going in the terminal right now:

revjohn13@revjohn13-desktop:~$ cd java
revjohn13@revjohn13-desktop:~/java$ ls
HelloWorldApp2.java HelloWorldApp.java myfirstjavaprog.class
HelloWorldApp.class HelloWorldApp.java~ myfirstprog.java
revjohn13@revjohn13-desktop:~/java$ java myfirstprog
Exception in thread "main" java.lang.NoClassDefFoundError: myfirstprog

Any ideas? Thanks, in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 26 2007
Added on Mar 28 2007
3 comments
151 views