I have a NetBeans project with quite a few classes in it.
I have been working on this project for the past 3 weeks and have now started this problem. When I click the Run Main Project button in NetBeans, I see the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: stockscreener/Stock
Caused by: java.lang.ClassNotFoundException: stockscreener.Stock
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: stockscreener.Main. Program will exit.
Java Result: 1
So, at first I thought that my Stock.java file was not built. However, NetBeans did not report any errors when running the clean / build command.
I decided to take a look at the "build / classes / sharescreener" directory. After performing the cleanup / assembly, I can find Stock.class in my classes / sharescreener directory, however, when I click "Run Main Project" in NetBeans, I immediately see that the class disappears (is deleted) from my view of the folder.
, , ( : NetBeans).
, JAR- .
?