Creating an Icon for Your Java Application on Windows

     

Say that you have created your JAR, and created a batch file that performs certain useful tasks such as setting environment variables , and now you want to make it pretty like a real, professional type application. To do this, create an icon, create a shortcut to the .bat file, and then change the icon used by the shortcut.

  1. Right-click on your .bat file or executable JAR file. Select Create Shortcut.

  2. Select Properties.

  3. Click Change Icon .

  4. Choose one of the many icons included with Windows just for a test. Browse to the location of your .ico file and click Apply for the real deal.

Don't be discouraged with all of this deployment business. There are ways of automating all of the necessary file copying, moving, deleting, generation, and even the Java compiling, JAR-ing, and more. The most popular way by far of automating all of this business is Ant. You can read about Ant, and download it for free at http://ant.apache.org. It integrates well with the most popular IDEs, and if you are using Eclipse (http://www.eclipse.org), then you already have Ant.

graphics/fridge_icon.jpg

FRIDGE

What's that? You don't have an .ico file? Such a file is an icon, a special kind of bitmap. You need an editor that will help you create them; you'll have a hard time in Photoshop alone or other typical graphic editors. I like the free Icon Studio from CoffeeCup software (http://www.coffeecup.com/freestuff/). It's full-featured and you can't beat the price. Just download and install it, then create your own icon and choose it for use on your shortcut. Windows will replace it immediately, and you're good to go.




Java Garage
Java Garage
ISBN: 0321246233
EAN: 2147483647
Year: 2006
Pages: 228
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net