jQuery in Action, 3rd edition
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


Win a copy of Head First Android this week in the Android forum!
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: 685
    
    1

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


When I was your age I was toggling in the bootstrap code on the front panel
Paul Clapham
Sheriff

Joined: Oct 14, 2005
Posts: 19662
    
  10

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: 2541
    
  10

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
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5850
    
    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
Sheriff

Joined: Oct 14, 2005
Posts: 19662
    
  10

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.
 
 
subject: Changing desktop icon for Javaw shortcut
 
It's not a secret anymore!