想知道我是否需要安装JDK 1.6& 1.7在一起? [英] Wondering whether I need to installll JDK 1.6 & 1.7 together?

查看:204
本文介绍了想知道我是否需要安装JDK 1.6& 1.7在一起?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用JDK 1.7编译以JDK 1.6编写的程式码吗?

Can I use JDK 1.7 to compile the code written in JDK 1.6? Is Java strict downward compatible?

我需要将JDK 1.6和JDK 1.7放在同一台机器上吗?

Do I need to keep JDK 1.6 and JDK 1.7 together in the same machine?

推荐答案


我可以使用JDK 1.7编译以JDK 1.6编写的代码吗?

Can I use JDK 1.7 to compile the code written in JDK 1.6?

是的。


向下兼容?

Is Java strict downward compatible?

如果交叉编译选项在编译时指定。最引人注目的是:

If the cross-compilation options are specified when compiling. Those are most notably:


  • -source

  • -target

  • -bootclasspath

  • -source
  • -target
  • -bootclasspath - which requires an rt.jar of the JRE (not JDK) being targeted

这篇关于想知道我是否需要安装JDK 1.6& 1.7在一起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆