Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » ClassNotFoundException
ClassNotFoundException [message #882406] Wed, 06 June 2012 12:04 Go to next message
Jonathan Camilleri is currently offline Jonathan CamilleriFriend
Messages: 91
Registered: July 2009
Member
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 15:18 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Are there errors shown in your Problems view that you have not addressed?

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Helios Eclipse Add On Components
Next Topic:download.eclipse.org repo unavailable?
Goto Forum:
  


Current Time: Thu Apr 25 02:01:51 GMT 2024

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

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

Back to the top