I have recently pulled my application from the ancient Java8 to Java12. Things seem to be almost entirely working. I can debug and run my application completely fine through Netbeans. When I clean/build, things seem to go smoothly. The problem is that when I build, the lib folder is not created or populated with my dependent libraries under the dist folder. When I go to Properties->Sources and set the Source/Binary format back to JDK 8, it creates the folder again just fine, but anything above that and the libraries are not copied.
I tried copying the files manually, but still no dice. My application does not recognize where they are and I get endless ClassNotFound exceptions if I try to run the jar file from terminal.
I have double checked under Properties->Build->Packaging and made certain that Copy Dependent Libraries is checked.
Any advice or thoughts would be greatly appreciated.
So as I do more research here, I think that this is a fundamental difference in how Java projects within Netbeans are being handled now. Here are steps to reproduce exactly what I'm seeing in a brand new Netbeans project.
1) Have Java12 and Netbeans 11
2) New Project-> Java With Ant-> Java Application
3) right click libraries and add any existing jar library
4) in the main class, import and reference something from that library
5) build the project
6) from the terminal, hit java -jar myProject.jar
Again, I've checked and Netbeans is still defaulting to the Copy Dependent Libraries option found under Properties->Build->Packaging, so I'm not sure why the libraries are being ignored. Below is what is output from my brand new test project:
Heyo, wanted to post thanks to everyone for the replies! I mostly have a handle on what needs to happen, but it all centers around the fundamental changes that were introduced with Java 9. Ultimately I'm going to be reworking my project from ANT to Maven and fully modularizing it, but that is a project unto itself, so it'll be at a later release date (with the current version released under a J8 build as it has in the past).
There wasn't any one issue that I was running into here, but a host of them, given how I was creating/utilizing my dependencies, and this is a good opportunityfor me to clean those all up and standardize them.
If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad: