Resource JFrame Icons

1

Good afternoon.

I'm having problems with my application. It executes with change of icon in JFrame . When compiling it to: "Runnable Jar file" and compile with: Launch4j for binary, the application simply does not open.

I am changing the icon by this command:

frame.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/z/app.png")));
    
asked by anonymous 29.03.2015 / 16:51

1 answer

1

I created 1 package with img name and changed the directory to:

frame.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/img/app.png")));
    
30.03.2015 / 02:45