By jag on Jan 08, 2007
For years I've wanted to set up a "Kitchen Sink Language" website for experimentation. A place where people could throw language features, no matter how absurd, just so that folks could play around. Now that javac has been open-sourced, it's easy. Peter von der Ahé beat me to it and built the site, but he hasn't quite got it ready yet.
Playing with javac is particularly easy since it got repackaged as a NetBeans extension. It's an odd but slick way to make it easily available: when running NetBeans 5.5, go to the update center. You'll find a javac project tool... Download it and create a javac project. It gets pre-populated with all the sources of javac. Lots of fun.
Even if you don't want to create a new language extension, installing the javac sources is interesting if you like studying compilers. It's a particularly nicely written one. No, I didn't write it: I wrote the original java compiler, which was a C program. It has thankfully been dead for years.
If you're into extreme sillyness, you can rewack the parser completely so that it will compile other languages. Several years ago I actually wrote a Fortran parser on top of javac - it was good enough to compile LINPACK, but not much else. I did eventually come to my senses and throw it away.
Another thing you can use javac for is dropping code into it that studies the parse tree. I like to do that when analysing language features: come up with a tree walker that looks for things that could be rewritten to use a proposed new feature. Rather than using javac, you can play with Jackpot in NetBeans to get the same capabilities (Jackpot is really just a UI for the AST). It's pretty depressing how few new language features improve more that a thin sliver of code. One of the reasons I like ":=" and operator overloading for  to map to container classes is that they simplify visual clutter all over the place.