• Post Reply Bookmark Topic Watch Topic
  • New Topic

class not found exception  RSS feed

 
ying lam
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am getting this class not found exception:

java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown Source)
at java.awt.image.BufferedImage.createGraphics(Unknown Source)

Can you please tell me which class is not found? And why it is not found? It looks like it is inside awt, it should be part of jre right?

Thank you.
 
Rob Spoor
Sheriff
Posts: 21050
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Strange, it doesn't say which class is missing. Are you sure this is the entire stack trace? If not, show it (UseCodeTags for it), and also show us the code that causes the error.
 
ying lam
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Rob.

But it looks like I am calling a java awt function and then it has a ClassNotFound. Right? The stack trace I cut-and-paste is the top of the stack track, I just skip the bottom ones.

So my question was why a awt function fails with a ClassNotFound exception.

thank you for any pointers.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Umm, I don't think anyone can even begin to research this problem without seeing the code that throws the exception. To get better help sooner, post a SSCCE that clearly demonstrates your problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!