Question: I know a bit about JDK and JRE source and binary compatibility (e.g. [this](http://upstream.rosalinux.ru/java/versions/jdk.html) and [this](https://stackoverflow.com/questions/4692626/is-jdk-upward-or-backward-compatible)), but not sure about the following situation:

Consider I have an application which is compiled using JDK5 and runs on JRE6. It uses some libraries (jars) which are also compiled using JDK5.

Now I want to compile my application using JDK6. What new problems could arise in runtime in such a case (particularly, in compatibility with the "old" jars)? Should I fully retest the application (touch every library) or can rely on promised JDK/JRE compatibility?

Answer: 
*Normally no problems should arise* if you set the compiler option of JDK6 to use 1.5 source compatibility. However *sometimes this is not always true*. 

I remember once when compiling 1.4 code with 1.5 compiler (using 1.4 compatibility). The jars where ok (1.4 binary level) but the application crashed due to a funny conversion.

We used a BigDecimal number passing an integer as argument to the constructor. The [1.4 version](http://docs.oracle.com/javase/1.4.2/docs/api/java/math/BigDecimal.html) had only a constructor from `double` but the [1.5 version](http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html) had both, the `int` and the `double` constructors. So when compiling with 1.4 compiler made the automatic conversion from `int` to `double`, but with the 1.5 compiler it checked that the `int` constructor existed and did not realize that conversion. Then when using the perfect binary compatible code on 1.4 JRE the program crashed with a `NoSuchMethodException`.

I have to admit that it was a strange case, but it is one of those cases where logic does not work. So my advice is if you plan to compile for older versions of JRE try to use the target version JDK whenever possible.
Untill and unless you have not changed your code and added new Java 6 features, there should be no issues.
With regards to other jars there should be no issues at all.
JDK always maintains backward compatibility.