the fix code of JavaFX
I've found the cause of the error, and here's how I fixed it:
-
Don't store your project inside a OneDrive-managed folder (such as the Documents folder). Maven may fail to access the local repository properly if the project is located in a OneDrive-managed directory. Move your project to another location, such as the D: drive or any folder that is not managed by OneDrive.
-
After fixing any typos or configuration issues, delete the
targetfolder inside your project. Thetargetfolder contains Maven's generated build files. If you don't delete it, Maven may continue using outdated build artifacts, causing the same error to appear even after you've fixed the problem. After deleting thetargetfolder, run the following command again:mvn clean compile javafx:run