用eclipse创建第一个JAVA项目怎么勾选JRE选项
问题描述:
一共有3个选项:
(1)使用执行环境JRE(V)
(2)使用特定于项目的JRE(S)
(3)使用缺省JRE(当前为“jdk-10.0.2”)(A)
选哪个呢?各有什么区别?
答
不用纠结都可以,只要是你希望的jre版本就行
Use an execution environment JRE:
When selected, you can specify an execution environment to be used for the new Java project. The new project will use a compiler compliance which fits best the selected execution environment.
Execution environments can be configured on the Java > Installed JREs > Execution Environmentspreference page.
执行环境的jre是通过 Java > Installed JREs > Execution Environmentspreference配置的jre,一般就是全局的jre可以配置,使用自己安装的jre或使用eclipse默认自带的jre
Use project specific JRE:
When selected, you can explicitly specify the JRE to be used for the new Java project. The new project will use a compiler compliance which matches the version of the selected JRE.
特定项目的jre只是针对当前项目,对当前项目的编译使用你所选的jre
Use default JRE:
When selected, the New Java Project Wizard creates a new Java project which uses the workspace default JRE. The default JRE can be configured on the Java > Installed JREs preference page.
The project will also use the default compiler compliance which can be configured on the Java > Compiler preference page.
Click on Configure default... to configure the default JRE and compiler compliance.
默认工作空间级别使用的jre,可以通过 Java > Installed JREs配置
以上三种jre来源都是可以指定的,自己下载一个jdk安装的系统通过eclipse配置指向你新装的jdk,默认的配置应该都是eclipse自带的jre
答
第一个表示你配置的执行环境。
第二个表示不同项目用想用不同的JRE,如有些老项目必须要低版本的JRE才能运行起来。
第三个就是默认的。
答
就选第一个就行了。进来默认是哪个就是哪个。