What about Kore? If you want to start at the beginning, you should download and browse around the source code for Kore. It is a cleanroom implementation for some of the Java API. It demonstrates some of the issues all of us face when building something both compatible with and independent of Sun Microsystems.