Unlike an EXE file, a JAR file has no icon. It's the operating system* that gives it an icon. You cannot change the icon of one JAR file without changing the icon of all JAR files. You should consider using a shortcut, but that's not platform independent.
* Actually the window manager, but let's not go into details. It's not the JAR file itself.
Hey akki. I don't think you can set this with some jar file attribute, but you can modify the icon depending the operating system.
In Ubuntu, right click -> properties -> in the basic tab, click on the picture, then select your icon.
This is not a nice solution, because you would need to do this in all clients.
you can change the icon of the jar file by the below code:
what i have done here is, I have saved the image 'mylogo.png' in a folder named 'images'. Then i am making it as the icon of the jar file.
To make the clients to see your icon, Made that image folder as hidden folder and send that hidden folder along with zip file in which you will place your jar application and lib files.
Balaji Ashokkumar, ~Dynamic Star~
With God,I'm a Hero... Without God,I'm a Zero...