Search code examples
javanetbeansicons

How to change executable jar file icon?


I have been able to change the runtime icon using this example like this

getFrame().setIconImage(Toolkit.getDefaultToolkit().getImage(getClass()
.getClassLoader().getResource("MyProject/resources/myIcon.png")));

but is there a way to tell NetBeans to use myIcon.png for the executable jar file (MyProject/dist/MyProject.jar) icon?


Solution

  • A launch wrapper is the solution, I use launch4j, a cross platform lightweight wrapper

    launch4j website