-1 on this. The JDK is *not* 100% backwards compatible. It's FORWARDS compatible yes, but not backwards.

One case I know of is that certain String methods in JDK6 went from taking (String s) as an arg, to taking (CharSequence c) as arguments, if compiled against JDK6 -even if targetting 1.5 bytecode- the compiled method signature looks for CharSequence, which when run on JDK5 fails with method-not-found and blows up.

There -are- legitimate cases for compiling with JDK5/JDK6 as your boot-class-path - for this - the toolchains plugin is your answer.

Mark


Baptiste MATHUS wrote:
+1  on the question, do you really need to build for both versions? As JDK
is backward compatible, you could for example build only with1.5.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to