This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
As Nigel comments, the problem is with your PATH variable. You need to set
CLASSPATH is a completely different creature. It is only used by Java internally to find .class files. PATH on the other hand is used by the operating system to locate executable programs. The later is the issue here since the OS needs to find the javac.exe program to compile your code.
That would be "jdk1.5.0\bin", of course, and, whereas the PATH likely needn't hold ".", there are lots of other things it needs to hold, to.
But you do need to confirm that, if you've got both JDK1.4 and 1.5 installed on your system, that either 1.5 comes first on your PATH, or you invoke the 1.5 compiler explicitly by using the full path.
It's possible, actually, that you've put jdk1.4\jre\lib\rt.jar into your CLASSPATH, though, and JDK 1.5 is using it. My advice to you is that unless you really understand CLASSPATH, the best thing to do is to ensure that it's not set to anything at all.