更改 .JAR 文件的图标
如何更改我想要分发的 .JAR
文件的图标?我已经更改了程序运行时显示的图标,但我想更改环境(例如Windows XP)中的图标,即文件本身的图标。我用谷歌搜索,但我能找到的最好的方法是将 .JAR
转换为 .EXE
,这不是最好的选择。
How can I change the icon of a .JAR
file I want to distribute? I have changed the icon that shows when the program is run, but I want to change the icon in the environment (e.g. Windows XP), that is for the file itself. I googled, but the best I could find is converting the .JAR
to a .EXE
, which is not the best choice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
图标是操作系统决定的,而不是您的:-(
在特定客户端中,您可以更改 .JAR 扩展名的本地设置,但不能作为通用分发机制
The icon is a decision of the OS, not yours :-(
In a specific client you can change the local settings for the .JAR extension, but not as a general distribution mechanism
这是 Java 与底层操作系统集成的限制。 jar 文件格式没有空间容纳图标数据,然后 Windows 不容易支持从数据文件中拉出图标,并且 Java 安装方法不会向 Windows 资源管理器添加任何可以拉出图标的钩子(如果有)实际上有任何空间)。
Sun 对此的错误报告为 https://bugs.java.com/bugdatabase/view_bug ?bug_id=4193740,而且只有12岁......
This is a limitation in the Java integration with the underlying operating system. The jar file format does not have room for the icon data, and then Windows does not easily support pulling out icons from data files, and the Java installation method does not add any hooks to Windows Explorer that could pull out the icons (if there was actually room for any).
The Sun bug report on this is https://bugs.java.com/bugdatabase/view_bug?bug_id=4193740, and is only 12 years old...