bootstrap类路径未与-source 1.6一起设置3 [英] bootstrap class path not set in conjunction with -source 1.6 3

查看:167
本文介绍了bootstrap类路径未与-source 1.6一起设置3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在编译代码时出现此错误:

i got this error when i'm compiling code :

[options] bootstrap类路径未与-source 1.6一起设置

[options] bootstrap class path not set in conjunction with -source 1.6

我知道有一些关于它的主题,但我不明白,我是初学者,所以对我来说有点复杂。
该计划来自我的学校,我正在使用JDK 8 home,只是你知道。

I know there are some topics about it but I just don't get it, i'm a beginner so it is a bit complicated for me. The program is from my school and I am using JDK 8 home, just so you know.

谢谢

推荐答案

您正在编译与Java 6的兼容性,但使用Java 8来执行此操作。这意味着如果在早期版本上运行,您可能会使用新的Java 8 API方法。

You are compiling for compatibility with Java 6, but using Java 8 to do it. This means you could potentially use new Java 8 API methods that won't be there if run on earlier versions.

您可以编译您的类,使它们只能在Java 8上运行,或者您可以将编译器指向Java 6库的副本,这样编译器就不会看看任何新的API(然后如果程序编译它应该适用于旧版本)。

You can compile your classes so that they only work on Java 8, or you can point the compiler at a copy of the Java 6 libraries so that the compiler won't see any of the new APIs (and then if the program compiles it should work on the older version).

该消息是警告 而不是错误。如果您完全确定不使用Java 7或更新的API方法,则可以忽略它。在一个更大的项目中,通过使用警告中提到的javac命令行选项,让编译器完全确定工作要容易得多。

That message is a warning and not an error. If you are absolutely sure you aren't using Java 7 or newer API methods then it can be ignored. On a larger project, it is much easier to let the compiler do the work to be absolutely sure, by using the javac command line option mentioned in the warning.

这篇关于bootstrap类路径未与-source 1.6一起设置3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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