Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the icon of a .JAR file

Tags:

java

icons

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.

like image 770
Demonick Avatar asked May 30 '10 11:05

Demonick


2 Answers

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

like image 52
ob1 Avatar answered Oct 22 '22 23:10

ob1


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 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4193740, and is only 12 years old...

like image 40
Thorbjørn Ravn Andersen Avatar answered Oct 22 '22 23:10

Thorbjørn Ravn Andersen