Simple redirect (or so I thought)

It should be real easy. All that I want to do is to redirect the error messages from a java compiler to an external file, so that I can read all of my error messages, not just the last ones that fit on my screen. In theory, it should go like this:

javac MyFile.java > errors.log

So, what am I doing wrong? It will create the error.log file, but won't direct anything into it. Suggestions? Am I just being stupid? I tried out a few other methods like tee, and nothing was happy.

Thanks

Usually, the errors output go to (wait for it...) standard error, or stderr. This file descriptor number is "2". So, you should be able to run it like this:
javac MyFile.java 2>error.log