java: putting icons in .jar files so that Windows Explorer can recognize them?

淺唱寂寞╮ 提交于 2019-12-11 07:56:25

问题


Windows knows where to find icons in .exe or .dll files. Is there any way to set up icon resources in a .jar file so that Windows can recognize them? (I'm interested in answers for XP or Windows 7)


回答1:


Java Web Start can install images to use for a desktop shortcut and menu item. JWS also supports a splash screen that can be shown while the application is loading (and/or updating new classes). The support for icons applies to any desktop PC platform for which Java is available (caveat: If the OS supports that functionality).




回答2:


This is not quite what you asked for, but I recommend using an executable wrapper like launch4j.

It will execute your Java app from a .exe and will include your icon like any other windows executable does.



来源:https://stackoverflow.com/questions/8977431/java-putting-icons-in-jar-files-so-that-windows-explorer-can-recognize-them

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!