I have been trying to get Maven set up with JavaFX. Even though I was unexperienced with Maven and JavaFX, I didn\'t expect it to be so much of a challenge. My Java knowledg
For me I had took care of following things -
Make sure fxml file is placed where your main class resides. And then load it using this - (In my case, TechJFX.fxml is the file)
FXMLLoader loader = new FXMLLoader(getClass().getResource("TechJFX.fxml"));
Add opencv-*.jar to your project folder (In my case opencv-300.jar)
Add the jar to the build path using
Right click on the project folder -> Build Path -> Configure Build Path -> Libraries Tab -> Add External JARS and locate the jar
Also, under Order and Export -> Tick opencv-300.jar and JRE System Library(if not already ticked)
Copy opencv_java*.dll (In my case opencv_java300.dll) to the same location where you jar is in the project folder.
Add the following method to your main class
static{
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
}
Done.
Hope this helps someone facing similar issue.