Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » I need help!(Exception in thread "main" java.lang.NoClassDefFoundError:)
I need help! [message #720291] Tue, 30 August 2011 06:23 Go to next message
Eclipse UserFriend
I study computer technology first year. And I´ve written this program :
public class Program4b
{
public static void main(String[]args)
{

double lengde=5.0; //legg inn grunnflatens lengde
double hoyde=6.0; //legg inn trekantens hoyde

double svar=(lengde*hoyde)/2; // gjør beregning


System.out.println("Arealet til trekanten er:"+svar+"cm2"); //skriv ut
}
}

But I keep getting the same console error no matter what I do:

Exception in thread "main" java.lang.NoClassDefFoundError: Program4
Caused by: java.lang.ClassNotFoundException: Program4
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:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

I need help to fix this, is there anyone who knows what to do?

All help will be appreciated Smile
Re: I need help! [message #720937 is a reply to message #720291] Wed, 31 August 2011 10:01 Go to previous message
Eclipse UserFriend
The error tells you want is wrong. I'll point out the relevant parts:

public class Program4b

Caused by: java.lang.ClassNotFoundException: Program4

Note that this not really related to Eclipse, a better forum would be:
forums.oracle.com/forums/forum.jspa?forumID=921
Previous Topic:Stepping into decompiled code without debug
Next Topic:Library problem
Goto Forum:
  


Current Time: Sun Jul 13 07:57:56 EDT 2025

Powered by FUDForum. Page generated in 0.24622 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top