Skip to main content



      Home
Home » Newcomers » Newcomers » ClassNotFoundException
ClassNotFoundException [message #882406] Wed, 06 June 2012 08:04 Go to next message
Eclipse UserFriend
Well, having initially thought it was a bug, I am typing some code, as I study for SCJP, and, when I type the following code I get a ClassNotFoundException.

I thought that is weird, however, the Eclipse Development Team kindly suggested to add JRE 1.6, which is questionable i.e. why should I need to add 1.6 when I have 1.7? do I need to do this for all the little applications that I code?

package mypackage;

public class AssertionTest2 {
public static void main (String[] args)
{
int a = 5;
assert (a != 5) : a;
}

}


java.lang.NoClassDefFoundError: mypackage/AssertionTest2
Caused by: java.lang.ClassNotFoundException: mypackage.AssertionTest2
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"
Re: ClassNotFoundException [message #884665 is a reply to message #882406] Mon, 11 June 2012 11:18 Go to previous message
Eclipse UserFriend
Are there errors shown in your Problems view that you have not addressed?

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational
Previous Topic:Helios Eclipse Add On Components
Next Topic:download.eclipse.org repo unavailable?
Goto Forum:
  


Current Time: Thu Jul 03 20:40:13 EDT 2025

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

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

Back to the top