Results 1 to 4 of 4
- 09-25-2015, 12:25 AM #1
Member
- Join Date
- Sep 2015
- Posts
- 2
- Rep Power
- 0
NoClassDefFound Error! Please Help!
I'm getting the NoClassDefFound Error when running this. Please note I'm very new to java.
Heres my code:
Java Code:class DoMath { public static void main(String[] arguents){ double velocity = 0; double accel = 0; double time = 0; System.out.println("Please enter the value for acceleration"); //promts user to input value for velocity double input = accel ; //accepts user input for acceleration System.out.println("Please enter the value for time in free fall"); //promts user to input value for time input = time ; //accepts user input for time velocity = 0.5 * accel * time ; System.out.println(velocity); } }
Exception in thread "main" java.lang.NoClassDefFoundError: gravcalc (wrong name: gravcalc/gravcalc)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java :800)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader .java:449)
at java.net.URLClassLoader.access$100(URLClassLoader. java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java: 361)
at java.net.URLClassLoader$1.run(URLClassLoader.java: 355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:4 25)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 58)
at sun.launcher.LauncherHelper.checkAndLoadMain(Launc herHelper.java:482)
------------------
(program exited with code: 1)
Press return to continue
Any help is appreciated!Last edited by ItsRoland; 09-25-2015 at 12:42 AM.
- 09-25-2015, 12:27 AM #2
Re: NoClassDefFound Error! Please Help!
Please edit your post and wrap the code in code tags.
getting the NoClassDefFound ErrorIf you don't understand my response, don't ignore it, ask a question.
- 09-25-2015, 12:30 AM #3
Member
- Join Date
- Sep 2015
- Posts
- 2
- Rep Power
- 0
Re: NoClassDefFound Error! Please Help!
added the full error message.
Last edited by ItsRoland; 09-25-2015 at 12:47 AM.
- 09-25-2015, 12:54 AM #4
Re: NoClassDefFound Error! Please Help!
Exception in thread "main" java.lang.NoClassDefFoundError: gravcalc (wrong name: gravcalc/gravcalc)
How is that error message related to the posted code? The posted code has class: DoMath; the error message has class: gravcalcIf you don't understand my response, don't ignore it, ask a question.
Similar Threads
-
JApplet Error, NoClassDefFound
By Deep in forum Java AppletsReplies: 0Last Post: 02-01-2014, 11:33 AM -
NoClassDefFound error using PDFBox
By Aminaz in forum New To JavaReplies: 1Last Post: 04-29-2012, 11:38 AM -
JPA application noclassdeffound error
By ishakteyran in forum New To JavaReplies: 2Last Post: 03-12-2010, 08:31 PM -
JPA application noclassdeffound error
By ishakteyran in forum Advanced JavaReplies: 2Last Post: 03-11-2010, 02:14 AM -
JPA application noclassdeffound error
By ishakteyran in forum Enterprise JavaBeans (EJB)Replies: 0Last Post: 03-11-2010, 01:34 AM
Bookmarks