Two Laptop Bag*
The moose likes General Computing and the fly likes Changing desktop icon for Javaw shortcut Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Changing desktop icon for Javaw shortcut" Watch "Changing desktop icon for Javaw shortcut" New topic
Author

Changing desktop icon for Javaw shortcut

Carey Brown
Ranch Hand

Joined: Nov 19, 2001
Posts: 174

I've been Googling changing icons for Java programs in Windows and all I've found is how to change the title-bar icon in a swing program. I've got a desktop shortcut which executes a Java program via javaw.exe and I want to create a new icon for it. I know you can right-click on the shortcut and select "change icon", but it appears that you can only change the icon to another icon found in another .exe file. I want to create my own icon from scratch. This is either dirt simple and I'm missing it or Windows won't let me do it. Ideas anyone?

Thanks,
Carey
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

I know that on my desktop on my home computer, there's a shortcut which runs a Java program and which displays an icon which I'm pretty sure wasn't in any executable. But I created that shortcut several years ago so I don't remember the details. I'm pretty sure it was dirt simple though. I will have a look when I get home.

Anyway this isn't a Java question ("How do I configure a Windows shortcut to have an icon of my choice") so I'm going to move it to a more suitable forum.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2500
    
    8

There is a bunch of nice icons to be found in some DLLs, like "%SystemRoot%\system32\SHELL32.dll"
You can also generate a .ico file yourself. That can be used a a pictogram too.
Free .ico generators and converters are available on the web.


OCUP UML fundamental and ITIL foundation
youtube channel
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

There are a number of locations on the web that provide free sets of icons. You can also find instructions on creating icons using Photoshop.


JBoss In Action
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Paul Clapham wrote:I know that on my desktop on my home computer, there's a shortcut which runs a Java program and which displays an icon which I'm pretty sure wasn't in any executable.


Yes, it's as I suspected. The shortcut I was talking about just contains a reference to an ordinary icon file (an image file with extension .ICO). So I guess it is dirt simple after all. Although you do have to have an icon file to point at. I don't believe you can use a GIF or a PNG or anything like that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing desktop icon for Javaw shortcut