我们正计划升级我们的 J2EE 应用程序,我之前使用过很多 jar,并且我知道版本不匹配可能是一个很难调试的问题。我们拥有使用 1.6 jdk 编译的所有 jars(公司内部并由其他团队构建,因此无法使用最新版本重新编译),并且我们正在将应用程序版本提升到 1.7,但我们计划在我们的应用程序中使用 1.6 版本 jars。这个效果好吗?如果不是,我应该怎样做才能使其兼容?
我确信它会运作良好,但是需要一些专家的意见。 谢谢
最佳答案
正如您在Oracle主页上看到的regarding compatibility of Java 1.7它应该是兼容的,除了 the following things
Binary Compatibility
Java SE 7 is binary-compatible with Java SE 6 except for the incompatibilities listed below. Except for the noted incompatibilities, class files built with the Java SE 6 compiler will run correctly in Java SE 7.
引自oracle
关于java - 在旧java版本上编译的jar可以在新应用程序中使用吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33084844/