Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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 REST with Spring (video course) this week in the Spring 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

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 Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
Could not find the main class: bsh.console. Program will exit.

How do i fix this any idea ?

Many thanks in advance
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
Java class names are case-sensitive.
Kowshik Nandagudi
Ranch Hand

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

Thank you Ulf Dittmer
Don't get me started about those stupid light bulbs.
subject: Exception in thread "main" java.lang.NoClassDefFoundError
It's not a secret anymore!