Created attachment 301541 [details, diff] oracle-jdk-bin.patch The Java Control Panel desktop entry has absolute value for icon which makes it incompatible with icon-themes. Packages affected are: dev-java/sun-jre-bin dev-java/sun-jdk dev-java/oracle-jre-bin dev-java/oracle-jdk-bin A simple change in the ebuild would fix this. The attached patch needs to be adjusted for other packages.
doicon takes a list of icons and installs them to /usr/share/pixmaps. With your patch we end up with all VMs installing a file /usr/share/pixmaps/sun-jcontrol.png, which we can't due to file collision. Also the file /opt/${P}/jre/lib/desktop/icons/hicolor/48x48/apps/sun-control.png only exists when reinstalling and doicon needs a "|| die" even with EAPI 4.
Okay, then how about checking if the file exists. if [[ ! -f /usr/share/pixmaps/sun-jcontrol.png ]]; then doicon /opt/${P}/jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png || die; fi Maybe this is overkill for just a couple of icons, so it's totally your call. (In reply to comment #1) > Also the file > /opt/${P}/jre/lib/desktop/icons/hicolor/48x48/apps/sun-control.png only exists > when reinstalling So, you mean to say it won't exist for someone who is installing it for the first time. I'm not an expert on java so I'm asking, why aren't the jdk and jre packages mutually exclusive.
This is fixed for following packages: * app-emulation/emul-linux-x86-java-1.6.0.31 * dev-java/sun-jdk-1.6.0.31 * dev-java/sun-jre-bin-1.6.0.31 * dev-java/oracle-jdk-bin-1.7.0.3 * dev-java/oracle-jre-bin-1.7.0.3 The icon is now always installed under a custom name and referenced without an absolute path. Also changed the .desktop to be installed with a more standard name, this might require to add it to your gui menus / preferences once more depending on your DE. An alternative would have been to install a .desktop file with java-config for the jcontrol wrapper. There are other wrappers (like jvisualvm) which might profit but for that we'd need icons which can be shipped with java-config. If you are interested please file a separate bug.