This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori 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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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: 20136
    
  30

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 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 5045
    
  10

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to give Icon to a Jar file ?
 
It's not a secret anymore!