[英]If my program is written using JDK 8, do all of my dependencies need to use JDK 8, not JDK 6? How is it different from JDK in build tools?
My intuition to the first question is yes.我对第一个问题的直觉是肯定的。 For the 2nd question, I did see in my work, someone use JDK8 with ANT, then compile the an old package written with JDK6 to 1.6.对于第二个问题,我在我的工作中确实看到有人使用带有ANT的JDK8,然后将用JDK6编写的旧包编译为1.6。 I got really confused.我真的很困惑。
Generally java is backwards compatible for all versions.通常,java 向后兼容所有版本。 See this for details.有关详细信息,请参阅此内容。
Java SE 8 is strongly compatible with previous versions of the Java platform. Java SE 8 与之前版本的 Java 平台高度兼容。 Almost all existing programs should run on Java SE 8 without modification.几乎所有现有程序都应无需修改即可在 Java SE 8 上运行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.