This is not the case; you need to register the class path of the ant compiler. Do it:
1. Open Netbeans and click the Tools link at the top or press Alt-t 2. Click options in the drop down menu from the tools or press Alt-o 3. Click Java on the top bar, it is the Java logo 4. Make sure you are on the ant tab, and your Ant-home has either, the built in Ant compiler(comes with netbeans, you do not need to set), or a custom one. On my computer, One virtual Machine says the Netbeans folder, and my Production Machine says, C:\Ant. Since I downloaded, and installed ant compiler myself for my production machine, more control! :D 5. Then make sure the Verbosity Level says Normal. 6. Then you will see a classpath box, it may be empty but should not be. 7. For mine, I have a few JDBC connectors for my database integration, and the ones you need to add, which are your project you are trying to make the installers for. So for my project it is a timeclock manager, and I named it TimeClock, but I also use another project as a library in that project, so I have 3 things total in my Classpath.
You want to add any packages for this project that have the main method in them, so I have 2, since one of them is just a library, to the class path.
8. My Classpath looks like this C:\Program Files (x86)\MySQL\MySQL Connector J\mysql-connector-java-5.1.34-bin.jar C:\Users\{my user Name}\Documents\NetBeansProjects\TimeClock\src\JFXPrint C:\Users\{my user Name}\Documents\NetBeansProjects\TimeClock\src\timeclock 9. Yours should look like this, if you only have one project
C:\Users\{Your user Name}\Documents\NetBeansProjects\{Your Project name}\src\{Your package Name}
9(mine). My Project name is TimeClock and My package names, where my main are located are, JFXPrint and timeclock. 10. YOUR DONE! Click Apply, Click OK, and restart the IDE. Then open it back up and right click the project and package as->All installers or whatever you want to do.
Hope this helps, I ran into this problem when I had it and no one knows what to do. I finally found it when I added my badge. I realized that my class path is empty and fixed it for only one project, I donβt know if it works to set the path to the entire NetBeansProject folder, but I donβt think this is a good way for anything, Globals never ! Since I did not see the answers, I decided that many people have this problem, so I decided to post the answer when I found out how to fix it.
Good luck and happy programming!