File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General 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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Exception in thread "main" java.lang.NoClassDefFoundError " Watch "Exception in thread "main" java.lang.NoClassDefFoundError " 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 JavaBeanShell QuickStart 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
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41634
    
  55
Java class names are case-sensitive.


Ping & DNS - my free Android networking tools app
Kowshik Nandagudi
Ranch Hand

Joined: Dec 09, 2010
Posts: 57
oh school boy mistake!!!

Thank you Ulf Dittmer
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Exception in thread "main" java.lang.NoClassDefFoundError