Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Java not finding main class?

njlanddesignernjlanddesigner Posts: 1Member
Hi all. I'm a java student and am trying to work through debugging a program. I thought I was about there when I tried to run it and got the "can't find main class" error. I'm not sure even what the nature of the problem could be, so I'll paste the compiler error message below and attach the code. Thanks in advance...

----jGRASP exec: java NextDay2

java.lang.NoClassDefFoundError: NextDay2
Caused by: java.lang.ClassNotFoundException: NextDay2
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: NextDay2. Program will exit.
Exception in thread "main"
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.

Sign In or Register to comment.