This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to give Icon to a Jar file ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to give Icon to a Jar file ?" Watch "How to give Icon to a Jar file ?" New topic
Author

How to give Icon to a Jar file ?

Rite Sara
Ranch Hand

Joined: Feb 13, 2010
Posts: 56
Hi,

I have created a jar file. I want to give a customized icon to this jar instead of the default icon that is there.
Please let me know how we can do this ..


Thanks,
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

JAR files do not have icons. The icon is given to it by Windows solely based on the fact that the extension is .jar, and there is a file association for .jar with that icon defined.

The best you can do without using Launch4J or similar tools to turn the JAR file into an EXE file is use a Windows shortcut. You can give these any icon you want.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

Or launch the application using Java Web Start. Google search "jnlp shortcut icon"


luck, db
There are no new questions, but there may be new answers.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to give Icon to a Jar file ?
 
Similar Threads
change the icon of .jar file
how do we load ................
change jar file's icon
display icon for core java executable jar
icon for executable jar file