• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems runing java prograns

 
Brooks MacBevers
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I try to run a java program I get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: test/class

I am runing java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-112)
Java HotSpot(TM) Client VM (build 1.5.0_06-64, mixed mode, sharing) on Mac OS X.
This is my program:
public class test {


public static void main (String[] args) {
System.out.print("test");
}

}

Thanks for any help you can provide.
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More than likely you typed java test.class

Just type java test
 
Anjana Ravindran
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at this question in java beginners faq.

reply if u r still not able to run the java pgms.

>>>>>
How do I run my very first Java program?
Mosey on over to the Java Tutorial
>>>>>>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic