Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How to get eclipse working?
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Kameboy




PostPosted: Tue Apr 12, 2011 7:19 pm   Post subject: How to get eclipse working?

I get these problems everytime i uninstalled and reinstalled jre 6 to see if that would fix it but it doesn't.

java.lang.NoClassDefFoundError: Helloworld
Caused by: java.lang.ClassNotFoundException: Helloworld
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main"

any suggestion on how to get this to work properly
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Tue Apr 12, 2011 7:22 pm   Post subject: RE:How to get eclipse working?

Quote:

java.lang.No Class Def Found Error: Helloworld

How are you trying to compile + execute your code?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Kameboy




PostPosted: Sat Apr 16, 2011 5:45 pm   Post subject: Re: How to get eclipse working?

Yeah i tried running a simple hello world so see if i set it up properly
Zren




PostPosted: Sat Apr 16, 2011 7:59 pm   Post subject: RE:How to get eclipse working?

The filename of the class must be the same as the name of the class. This is case sensitive. It must also be a public class.

Eg:

Filename: Helloworld.java

public class Helloworld {
public static void main(String[] args) {}
}
Kameboy




PostPosted: Wed Apr 20, 2011 6:04 pm   Post subject: Re: How to get eclipse working?

I tried what you said it still not working.
chrisbrown




PostPosted: Wed Apr 20, 2011 6:36 pm   Post subject: Re: How to get eclipse working?

Kameboy @ Tue Apr 12, 2011 7:19 pm wrote:
I get these problems everytime i uninstalled and reinstalled jre 6 to see if that would fix it but it doesn't.

You do have the JDK installed, right?
Kameboy




PostPosted: Thu Apr 21, 2011 5:57 pm   Post subject: Re: How to get eclipse working?

What would be a good JDK to install i download the JDK from this website
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: