Does Netbeans Remove Inline Class?

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- .

?

+3
4

, , . , , . user/.netbeans/6.9 ( )/var/cache → , netbeans. !!

+2

" " . " " "" .

+2

I had the same problem. Windwos 7 File Explorer showed a file with gray X. The solution was to connect to a corporate file server.

0
source

Try to perform trivial editing of the source file or by using the “touch” to update the modification time of the .java file. It worked for me.

0
source

Source: https://habr.com/ru/post/1767795/


All Articles