Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Customize Java application icons Desktop
If you've ever tried to paste a custom icon on a Java application (such as LimeWire or jEdit), you'll find it's impossible, at least through normal means. I ran across this due to some sort of odd design in the LimeWire icon - when placed in my DragThing dock, the LimeWire icon did not respond to a mouse click (quite odd). So I went to paste a replacement in, only to find that it was impossible. I also tried creating an alias and pasting a custom icon there (no go) as well as using an AppleScript to open LimeWire (no go - AppleScript must have a syntax for opening Java apps that I just don't know; it can't find the LimeWire app).

After a bit of poking around in MRJAppBuilder, I found a fairly easy way to replace Java applications' icons. If you'd like the step-by-step method, read the rest of this article.

By the way, that new LimeWire icon is from a set called "Unreleased" by Pedro Fernandez, downloaded from xicons.com.

To replace the icon for a bundled Java application such as LimeWire or jEdit, you'll first need an actual Mac OS X .icns file. You can't use a pasted icon from a folder. Some downloaded icons will be in "folder" format, others (such as the replacement LimeWire icon mentioned earlier) are in .icns format already. If you'd like to convert a standard "folder" icon into a .icns file, you'll need something like Iconographer. Paste in the image and "Save As" in a .icns format.

Once you have your .icns file, here's how to use it:
  1. Right click on the Java application in the Finder and select "Show Package Contents".

  2. Select the "Contents" folder, and then open Info.plist file in your favorite text editor. Just below the "dict" tag, you should see:
    <key>CFBundleIconFile</key>
    <string>GenericJavaApp.icns</string>
    Replace "GenericJavaApp.icns" with the name of your new icon file - make sure the case matches and you include the .icns extension. Save your changes.

  3. Drag your new .icns file into the "Resources" folder that's in the "Contents" folder you opened in step one.
That's it! To make the icon show up immediately, you can try a couple of things -- launch the application, logout/login, or move the app to a new location and then move it back. It may not seem like it worked, but I had success on all three Java apps I tried; it just some action on the file to make the new icon show in the Finder.

The process isn't quite as intuitive as pasting in the Get Info window, but it's not that much harder -- and the customized icons look so much nicer than the generic Java coffee mug!
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[11,913 views]  

Customize Java application icons | 4 comments | Create New Account
Click here to return to the 'Customize Java application icons' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
MRJAppBuilder no more
Authored by: damold on Oct 13, '01 11:12:08PM

This is a great hint, and I was just going to try it out, when my OSX 10.1 upgrade arrived. I upgraded the developer tools, and now MRJAppBuilder quits as soon as it starts up. It seems to be one of the few files not updated by the installer. Anyone else have that problem?



[ Reply to This | # ]
MRJAppBuilder once more
Authored by: damold on Oct 13, '01 11:23:29PM

In case any one did have that problem, I found the answer in apple's Java release notes for 10.1:

The Developer CD update installer does not update MRJAppBuilder. To assure that MRJAppBuilder is properly installed, you should remove MRJAppBuilder from /Developer/Applications before running the installer on the Developer CD. If you have already run the installer, you can check the version of MRJAppBuilder to determine whether the correct version has been installed. The correct MRJAppBuilder version is 1.1. The older version of MRJAppBuilder was 10.0. If you still have the older version of MRJAppBuilder, remove it and then rerun the Installer on the Developer CD, selecting only the Developer Tools Software package.



[ Reply to This | # ]
Another tutorial page
Authored by: 47ronin on Oct 14, '01 12:46:16AM

I created a page a few months ago about this same subject. It's a little outdated because Limewire has its own icon but it works for other Java apps!

http://homepage.mac.com/gfxjedi/limewireicon.html



[ Reply to This | # ]
Easier way to change icon for java-bundles
Authored by: mark.Zhang.US@gm on May 11, '10 04:24:28PM

Hey, I figured out a way to fix it, just change the user access prefs in the info window.

Check out my blog post about it at

http://simplicityssake.tumblr.com/post/590723877/replacing-icons-for-java-bundles



[ Reply to This | # ]