A few days ago I installed Oracle JDK (version 1.7.0_40) built especially for early access purposes. So, it’s not the final release. The build contains tons of bug fixes and backports from JDK 8 for AWT/Swing and that was the main point why I started to play with it. As you might have heard, Retina support was one of the major issues in all 1.7.* releases. I’d say there was no Retina support before the build 1.7.0_40. I’m going to show you some differences of Retina support in Apple and Oracle JDKs.

1. isRetina() method

That’s funny, but there is no public API for it in Oracle JDK 7. Here is how we (IntelliJ IDEA team) do it under Apple JDK:

If you read this, you probably have a web-site or a personal blog. Anyway, you know what is a favicon. A favicon is an icon representing your web-site in bookmarks, address bar, etc. In 99% it’s 16×16 px ico file and in 99% it looks ugly on a Retina device. This is how my Bookmarks bar looks in Chrome.

Icons on the left are made with retina quality, and icons on the right are not. To fix it, we need 32×32 px version of the icon. Once you’ve made it, you need an ico file containing both 16x16px and 32x32px icons. I’d recommend to use X-Icon Editor – a web-based tool doing all dirty job for you. All you need is:

Upload 32x32px PNG icon

Leave 16×16 and 32×32 options checked and uncheck others

Click OK and download ICO file

Rename it to favicon.ico and upload it to yours web-site document root. So it’s available at http://mydomain.com/favicon.ico