This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
There is a page on this topic here on the Ranch. It only lists the caveats, but there is also a link on that page to a thread where one of our users posted code which worked for him. And of course, as a last resort, links to documentation.