• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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: 15510
363
  • 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: 22783
131
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: 15510
363
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic