hello johnb!
i can offer some suggestions (for what they're worth):
1) if you are placing *.bat files on the desktop as shortcuts, nothing you do in your java programs will impact the icons shown on the desktop.
if you invoke your code using .bat files, and you want custom icons, then you can always either
(a) edit the properties of the shortcut and change
the icon, or
(b) use .pif or .lnk files containing appropriate references
2) if you want to STOP using .bat files, and launch with java, you can still manually create desktop shortcuts with the icons you prefer. If you installed the java SDK, you can probably drag-n-drop your jar onto your desktop and run it straight-away (...once you chg the icon of course:-)
3) intermediate level: windows desktop can do web-style launch of your app, depending upon how you have packaged it ... but this has nothing to do with the desktop icon, so i'll skip the blab
4) FINALLY, if you want something more windows-ease, then you'll need to work with windows internals to create some kind of launcher for your apps. (.exe s can have associated icons that will get automatically displayed in shortcuts)
if you'd like to see an example of that,
have a look under the hood at the jEdit launcher. The launcher is a COM component written in C/C++. Although JEdit is a java-based editor (and a fine one too!), the win launcher is an .EXE file (the install program updates the windows registry as well).
But I'm guessing you don't wish to do something that elaborate for the level of compatibility you're after...
anyway, hope one of these suggestions is helpful...
best!