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.