Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

display icon for core java executable jar

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

Can any one help me to find solution to display icon for an executable jar which i am going to distribute.
Here the issue is i am not using either swings or applets.
So, is it possible with core java executable jar ?

Appreciations in advance.



kishore
 
Saloon Keeper
Posts: 13427
303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think so. The icon associated with your jar will be associated with all jars, and I doubt that's what you want.

If you want a custom icon, I think you will have to use a wrapper executable with your icon, which simply starts up your jar.
 
Sheriff
Posts: 22512
122
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or a simple shortcut (.lnk) file with its own icon set.
 
a kishore
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stephan and Rob many thanks for your replies.

Stephan, can you give steps how to make wrapper executable jar with icon. I mean where to place icon and how to call it, either in manifest file or how. I'm bit new to this.

Rob, I don't think I can use that if I want to distribute this jar together with that icon. If there is any possibility please let me know.



Thanks
kishore
 
Stephan van Hulst
Saloon Keeper
Posts: 13427
303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, a wrapper executable is simply a small program in a native language, that has the icon built in, and has the only task of starting up the JVM with your program.

Rob's solution is more elegant. I don't know about other operating systems, but in Windows, you can create a new shortcut through the context menu (right mouse button) and have it link to your Jar. Then, right click the shortcut and go to properties, and you can embed an icon into it.

You will have to provide different shortcuts for different OSes.
 
a kishore
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Stephan. I managed to do it now.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic