As far as I know Java is backwards compatible and you shouldn't experience troubles compiling. Might be, that code uses some features that were deprecated or something similar. Have you tryed using -source 1.5 switch when compiling? Maybe if you posted the errors you get when you compile we coud be of more help.
Java 6 is supposed to be backward compatible with Java 5. However...
I have encountered a few Java 5 applications that will not compile correctly with Java 6. And I have encountered a Java 5 application, compiled with Java 5, that will not run correctly in Java 6. I guess there are flaws with the compatibility.
Sometimes code does change meaning with a new JDK; these are generally obscure cases, but they can be a pain in the class. There are some overloaded versions of StringBuffer::append() that were added in JDK 1.4 and JDK 1.5. Code that in JDK 1.3 might have invoked append(Object) will now invoke append(StringBuffer). If you compile that code with a 1.5 JDK, even if you use -source 1.3 -target 1.3, it won't execute on a 1.3 JRE because that method will be missing. Like I said, obscure, but a huge pain if you bump into it.