my dog learned polymorphism*
The moose likes Beginning Java and the fly likes Exception in thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Exception in thread "main" java.lang.NoClassDefFoundError

Kowshik Nandagudi
Ranch Hand

Joined: Dec 09, 2010
Posts: 57
Hi I am trying to set up java beanshell environment and after following the steps in webpage i am getting

C:\Program Files\Java\jre6\lib\ext>java bsh.console
Exception in thread "main" java.lang.NoClassDefFoundError: bsh/console
Caused by: java.lang.ClassNotFoundException: bsh.console
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: bsh.console. Program will exit.


How do i fix this any idea ?

Many thanks in advance
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Once is enough. UseOneThreadPerQuestion.

Although this thread was created before the other one I will still close this one since the other has a useful reply.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception in thread "main" java.lang.NoClassDefFoundError
 
Similar Threads
Getting Exception while running a class file.
Exception in thread "main" java.lang.NoClassDefFoundError
Starting Websphere 6.0 in Eclipse3.3
3rd party library problem
ClassNotFoundException error