Create jar file with images and database
1 answer
you can try with
URL loadingUrl = this.getClass().getResource("/images/a.jpg");
ImageIcon icon = new ImageIcon(loadingUrl);
using getClass().getResource(..)
should be the correct approach for loading files from a JAR. But remember to check the documentation for the exact specification (if I'm not mistaken it adds the complete package to the path you download)
+1
a source to share