java - How to combine mysql Jar with the application jar file in IntelliJ IDEA 14 -
i used idea14 make dbms application in java swing gui. try run jar file, i'm having class not found exception mysql jdbc connector. i'm stuck , have no clue on how resolve issue...
you trying put mysql.jar dependency in same jar , reference manifest's class-path, , not possible default java class loader.
see details official java documentation @ https://docs.oracle.com/javase/tutorial/deployment/jar/downman.html
one way of fixing move mysql.jar out of smsreminder.jar artifact, on same level smsremider.jar. change class-path entry become class-path: mysql.jar (note there no full path here c:/ideaprojects/..). when building artifact, idea place both jars in 1 , same folder. running java -jar smsreminder.jar should work.
another way use custom or opensource class loader, described here: classpath including jar within jar
Comments
Post a Comment