How to includes all images in jar file using eclipse

You need to get it from the classpath instead of from the local disk file system.

Assuming that images is actually a package and that this package is inside the same JAR as the current class, then do so:

final public ImageIcon iReport = 
    new ImageIcon(getClass().getResource("/images/Report.png"));

Leave a Comment