The Java SE sources are downloadable from java.net, and you can
change and extend them within the constraints of the relevant
licenses. But building the whole of Java SE is a major
undertaking. Here's how to build just the JMX API. The same
ideas would apply to building other subsets of Java SE that are
Java-language-only.
Update: there is now a purpose-...