How to change executable jar file icon?

后端 未结 5 882
感情败类
感情败类 2020-12-01 12:34

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

getFrame().setIconImage(Toolkit.getDefaultToolkit().getImage(getClass()
.getClassLoa         


        
5条回答
  •  不思量自难忘°
    2020-12-01 13:06

    No, there isn't, because icon is determined by Java. Only way to do so (at least for Windows) is to use wrapper like launch4j and then set icon path. If you already have wrapped exe with no or wrong icon, you can use Recource Hacker and then follow turtorials on how to change icon. Otherwise, you can't change .jar's icon

提交回复
热议问题