Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个项目,我只需要与 JDK 1.4 兼容。但是,我的系统(Mac)上没有安装 JDK 1.4。我在 Eclipse 中收到以下警告:
构建路径指定执行环境 J2SE-1.4。工作空间中没有安装与此环境严格兼容的 JRE。
我安装了兼容的 JDK 8,但 Eclipse 无法识别它。我不希望任何超过 1.4 的东西进入这个项目。我该如何配置呢?
该项目可能配置为使用 JDK 1.4。
由于您没有安装那个,您需要删除它并添加您实际拥有的 1.8。
然后可以将源兼容性配置为使用1.4,这样就不能使用新功能了。