JDK6 libraries - compatibility with JDK7

1.9k Views Asked by At

Is JDK7 backward compatible with JDK 6? Specifically, if I have some jars compiled using JDK6, will I able to use them while developing in JDK7?

3

There are 3 best solutions below

0
On

Yes, you can certainly use older .jar files and .class files in your current development with newer compilers :)

0
On

You'll be able to use class files from previous JREs/JDKs. Compatibility forwards is supported. However you won't be able to go backwards (e.g. JDK7 to an earlier JRE/JDK). The class file format for JDK7 has changed to reflect such things as invokedynamic.

Some more in-depth information discussed here.

0
On

Is JDK7 backward compatible with JDK 6?

  • Read official document about incompatibilities between JDK 6 and 7
  • Look at this table for independent analysis of API changes. The backward binary and source compatibility of Jre classes between 6 and 7 versions is estimated at 95%:

enter image description here

...

enter image description here

The report is generated by the japi-compliance-checker tool.