'In netbeans 12.4 maven javafx project I ran git rm and git restore on files in /target/class and now get maven error on run so how do I fix?
After executing git rm and git restore on some files in only the /target/class folder in a NetBeans 12.4 maven javafx project that also uses graalvm, I then attempted to run the project using Run Project icon and get the error that javafx runtime components are missing. The maven debug report contains no information about the specific components that are missing.
This error is thrown when maven reports it is "Executing command line" and the command line is given as "C:\graalvm-ce-java16-21.2.0\bin\java.exe, -classpath, ...." The ellipsis is a long list of directories and files, all of which I have checked and verified are in my project.
The first entry after "classpath," is "C:\Users\don\Documents\GWP\GUIWeb\target\classes", and this is the folder in which I ran git rm and git restore commands. But there is still a corresponding .class file in the project's target/class folder for every .java class in my NetBeans Projects panel. The maven error report does not specify any file names subsequent to reporting the error. It merely gives a long list of file line numbers that were executed.
Is there anything I can do to get maven to stop throwing this error?
Solution 1:[1]
The answer turns out to be quite simple. Just execute "mvn -X javafx:run" in a CLI. This command simply ignores the contents of the target/class directory and generates all the files in target/class anew. The program runs without errors. However, subsequent use of the methods to run the project within NetBeans 12.4 DO NOT WORK. But I can easily live with that until I learn how to fix what's going on in NetBeans (IF I ever even want to).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
