This is a fairly bog-standard Quine, written when I had some spare time back in first year. A few other versions were produced that would also compile and run themselves, but these seem to have been lost since I didn't use an RCS back then. C'est la vie.
For those of you who prefer shell commands to english:
$ ls Quine.class Quine.java README $ mv Quine.java Quine-original.java $ java Quine $ diff Quine.java Quine-original.java $
Since this program generates its own source, you don't need both the bytecode and the source. They're both listed if you wish to check the output. It was written for java 1.5, but should run & compile on anything over 1.4.
Since this code doesn't do much the only real question is how to compile it, or how to run it.
To compile the code, simply run javac Quine.java. That will create the tasty tasty class file
To run the quine, run java Quine. The quine will create Quine.java in the current directory — compiling this should create an identical class.