简体   繁体   English

使用Java 7 / Eclipse 3.7.1的无头pde构建失败

[英]Headless pde build with Java 7 / Eclipse 3.7.1 fails

We are trying to get a working headless PDE build for our application but compiling fails during the build with the following message: 我们正在尝试为我们的应用程序提供正常运行的PDE构建,但是在构建过程中编译失败并显示以下消息:

  ERROR in C:\...\TimerManager.java 
           [javac]  private final Map<String, ScheduledFuture<?>> activeTimer = new HashMap<>();
           [javac]                                                                  ^^^^^^^
           [javac] '<>' operator is not allowed for source level below 1.7

The following settings are made: 进行以下设置:

  • In the build.properties file the following properties are set. 在build.properties文件中,设置了以下属性。

      CDC-1.1/Foundation-1.1 = ${java.home}/lib/rt.jar JavaSE-1.7 = ${java.home}/lib/rt.jar path.jre = C:/Programme/Java/jre7 javacSource=1.7 javacTarget=1.7 
  • The minimum execution environments of the built plugins is JavaSE-1.7 内置插件的最低执行环境为JavaSE-1.7

  • The workspace used for building uses Java 7 successfully. 用于构建的工作空间成功使用Java 7。

We are able to run the product of our application succesfully with eclipse. 我们能够使用eclipse成功地运行应用程序的产品。

Perhaps an important point is that we use our target platform (including some plugins and features coming from Eclipse 3.7.0 rcp_sdk) as ${baseLocation} in the PDE build.xml . 也许重要的一点是,我们在PDE build.xml ${baseLocation}目标平台(包括来自Eclipse 3.7.0 rcp_sdk的一些插件和功能)用作${baseLocation}

Using the Eclipse 3.7.1 installation as ${baseLocation} the build succeeds, but for productive use we need our target platform plugins which replace some eclipse plugins in our application. 使用Eclipse 3.7.1安装作为${baseLocation}成功完成构建,但是为了有效地使用,我们需要目标平台插件来替换应用程序中的某些eclipse插件。

We start the build in the build.xml with this task: 我们通过以下任务在build.xml开始构建:

<ant antfile="${eclipse.pdebuild.scripts}productBuild/productBuild.xml" />

Is it possible that the baseLocation causes that the wrong compiler is used? baseLocation是否可能导致使用了错误的编译器? Or is there another place to define the source level? 还是在其他地方定义源级别?

The PDE plugins in our Eclipse 3.7.1 installation are installed, ${eclipse.pdebuild.scripts} is set correctly, according to Target Platform for PDE ... . 根据Target Platform for PDE ... ,已安装Eclipse 3.7.1安装中的PDE插件,正确设置了${eclipse.pdebuild.scripts}

Using the plugin org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar instead of org.eclipse.osgi_3.7.0.v20110613.jar in the "3.7.0 target platform" the compilation and the build succeeds. 使用“ 3.7.0目标平台”中的插件org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar而不是org.eclipse.osgi_3.7.0.v20110613.jar,编译和构建成功。

But the reason why the compilation with the old org.eclipse.osgi-plugin fails is not clear for me. 但是对于我来说,使用旧的org.eclipse.osgi-plugin编译失败的原因尚不清楚。 I would have expected a dependency resolve error or something like that. 我本来希望依赖解决错误或类似的东西。

I would be happy if anyone has some background information about that topic. 如果有人对此主题有一些背景信息,我将很高兴。

谢谢,它通过将Eclipse Indigo升级到SR2起作用了!

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

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