"Could not find or load main class" ereur when i import a JasperReport library
Hi, when i use the artifact to create a ".jar" file of my project (depending on JavaFX, JDBC, JasperReport libraries), and try to run it using CMD (java --module-path "Path to Javafx lib" --add-modules javafx.controls,javafx.fxml) i get the following error :
Could not find or load main class com.example.mvnjavafxwithdep.HelloApplication
Caused by: java.lang.ClassNotFoundException: com.example.mvnjavafxwithdep.HelloApplication
but when i retire the JasperReport's library it works fine, so i'm really not sure why artifact tool is not working as it should with a project using JasperReport as a dependency.
PS: i tried to export it using eclipse and it worked fine, so the issue is obviously from Intellij.
Any idea how to solve this?
Manifest content :
Manifest-Version: 1.0
Main-Class: com.example.mvnjavafxwithdep.HelloApplication
Please sign in to leave a comment.
See https://stackoverflow.com/a/42660624/104891, https://stackoverflow.com/a/45169655/104891 and https://youtrack.jetbrains.com/issue/IDEA-116209#comment=27-656589.
It looks the library i used has a digital signature (.SF file) should I delet this file from the library ? (will this have any consequence?)
Yes, you should remove it, otherwise the jar will not work.
thank you it worked