简体   繁体   English

Eclipse JRE版本问题

[英]Eclipse JRE version Issue

i checked out 4 eclipse maven project in a new workspace, the issue is in eclipse proj it shows JRE5 or JRE6 but actually it refers JRE7 我在一个新的工作区中签出了4个Eclipse Maven项目,问题出在Eclipse项目中,它显示了JRE5或JRE6,但实际上它是指JRE7

My eclipse default is JRE6. 我的Eclipse默认值为JRE6。 Things work fine in old workspace. 在旧的工作区中一切正常。

in pom.xml compiler plugin is correctly configured to 1.6 , still when i run "mvn install" i see it using JRE7 not 6. I want to use JRE6 for all projects have configured same in pom.xml and eclipse still always picks up JRE7 在pom.xml编译器插件中正确配置为1.6,仍然在我运行“ mvn install”时看到它使用JRE7而不是6。我想对所有已在pom.xml中配置相同项目的项目使用JRE6,并且eclipse仍然总是使用JRE7

what am i doing wrong ?? 我究竟做错了什么 ??

在此处输入图片说明在此处输入图片说明

You need to configure the execution environments in Eclipse to use your preferred JDK. 您需要在Eclipse中配置执行环境以使用首选的JDK。 I suspect version 7 is currently configured for the J2SE-1.5 and JavaSE-1.6 environments. 我怀疑当前为J2SE-1.5和JavaSE-1.6环境配置了版本7。

  1. Don't use "Run as > Maven install" or any of the other direct Maven commands from Eclipse unless you have some major reason to do so. 除非您有一些主要理由,否则不要使用“ Run as> Maven install”或其他任何来自Eclipse的直接Maven命令。 It'll just end up confusing both Eclipse and Maven. 最终只会混淆Eclipse和Maven。 Run from the command-line if you need to run a specific Maven goal (like "package") 如果您需要运行特定的Maven目标(例如“包”),请从命令行运行
  2. After you set up the Maven compiler plugin, you need to update the project. 设置Maven编译器插件后,需要更新项目。 In Eclipse, right-click the project folder and select "Maven > Update Project..." 在Eclipse中,右键单击项目文件夹,然后选择“ Maven>更新项目...”

earlier only JRE7 was installed hence the issue now added path for JDK6 working fine now 先前仅安装了JRE7,因此该问题现在添加了JDK6的工作路径,现在可以正常工作

IS this setting WorkSpace specific ?? 此设置是否特定于WorkSpace?

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM