(Warning: Some background knowledge about the working of CVS is needed to understand this paragraph.) One of the few ways to kick yourself in the foot with CVS is to create a new file (in this case, a .java); forget to add it to the CVS; commit the other files; and then try to test if the build works by deleting the whole folder and checking out again there.
Short story short, three hours of hard (copy-paste) work was going to go down the drain. The file had gone; I had to recover it.
Google. The first result was this supposedly oft-used program called DiskInternals Uneraser available from http://www.diskinternals.com/. The program took quite some time to scan the partition and then did find the deleted .java and .class file, but said it needed the paid version (~10$) to actually recover them. Searching for a crack (using a GNU/Linux box, of course) was in vain. Some site actually made me download a .zip and then had a file in it which read:
S/N: Evalution
I searched some more and found:
http://www.ntfsundelete.com/
A nice piece of gratis software from a company known as Atola Technologies, this product did the job well. It scanned through the disk faster, had a better interface than the DiskInternals Uneraser, and managed to try to recover the files without any payment of any sort. It turned out that the .java file couldn't be recovered fully, but the .class file could. But I did need the source. Then comes another gratis software cavaj (downloadable from http://www.bysoft.se/sureshot/cavaj/) to the rescue. Cavaj gracefully created the .java from the class file, and this .java was almost compilable. Just a one line change, and I had my file back!