• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can anybody help? NoClassDefFoundException

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I devoloped E-mail application.
I am running the application fine. But i am getting runtime exception as :

java.lang.NoClassDefFoundError: javax/mail/Message
<<no stack trace available>>
com.sssw.rt.util.AgoException:
java.lang.NoClassDefFoundError: javax/mail/Message
<<no stack trace available>>

Actually i checked my class path, there i added mail.jar,...

I don't know exactly what's wrong....
Surprisingly application is working.

If any reply, would be greatly appeciate.

Ravi
[ January 07, 2006: Message edited by: Bear Bibeault ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are getting an Error java.lang.NoClassDefFoundException

This means your OS (Operating System) is unable to find the class. You need to instruct a compiler to check the current directory where you have your generated class file.

For this, you can include . (dot) in your classpath like this.

Right click MyComputer Go to properties / Advance / In CLASSPATH include .;
(dot)

or
set classpath=.;C:\j2sdk\bin;

this dot will help compiler to check for the present directory for class.
try again java (your class) at command prompt.

You will get output now.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Web containers pay no attention whatsoever to the classpath. You need to put the jar file somewhere where the container will add the file to its own classpath. Check the documentation for your container.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic