redirecting compiler output

How do you redirect the javac output to a file on a Windows computer? I have tried and always get a blank empty file. I dont want to use Forte or another IDE since it likes to mangle my code if I edited the code it originally created.
[248 byte] By [mochajavatea] at [2007-9-26 8:27:50]
# 1
tryjavac ... 2>compiler.messages
davejenk at 2007-7-1 19:06:02 > top of Java-index,Developer Tools,Java Compiler...
# 2

I tried the following.

javac helloworld.java >error.txt

the above line created a text file that was empty

javac -verbose helloworld.java >error.txt

the above line created a text file that was empty

Usually the redirection operator works with most dos apps. I am running Win 98 SE and using java 1.31. Anyone with any idea what I am doing wrong or how to get the compiler to output to a file please post.

mochajavatea at 2007-7-1 19:06:02 > top of Java-index,Developer Tools,Java Compiler...
# 3
The '2' in the command in my previous reply is important. It means redirect to stderr. Try:javac -verbose helloworld.java 2>error.txt
davejenk at 2007-7-1 19:06:02 > top of Java-index,Developer Tools,Java Compiler...