On Ubuntu Oneiric, I am mildly annoyed by the icon that apparently Java programs give themselves by default. It is too low a resolution. I have 'emblem' set as the overlay icon for Compiz's scale and this seems to be an acceptable resolution for this context. However, the icon that is got by the launcher is different to the one that scale gets and is a lower resolution. The Unity window switcher also gets an icon that it is too low a resolution.
I have scoured all my directories for any .png with the letter 'j' (in the hope of finding 'java.png' or 'jvm.png' or something) in it and replaced all appropriate ones with a high resolution alternative, which has red rays emanating from the mug in the icon (the Fænza—my current icon theme—variant). As you can see, the icons above still all have orange rays and are not the right resolution. I cannot find any reference now to a .png file with 'j' in it that looks like these icons.
I would like to know where these icons are coming from and whether it is possible to replace them with higher resolution versions. All my other icons are pretty.
I had this annoying low-res icons with applications and managed to solve it by explicitly specifying the higher resolution icon to be used.
I launched 'Main Menu', looked for the problematic application, clicked properties and then on the icon. I chose a new higher resolution icon for it. Remove it from launcher and add it again and it should now have the high resolution icon.
There is no one place where application icons are being placed. It can be /usr/share/pixmap, /usr/share/icons or installed application directory.
You can always download from the internet high resolution icon, save it to some directory and reference it.