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

发布于 2024-12-13 11:28:45 字数 1459 浏览 0 评论 0原文

我们正在尝试为我们的应用程序构建一个工作的无头 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

进行了以下设置:

  • 在 build.properties 文件中设置了以下属性。

    <预><代码> CDC-1.1/Foundation-1.1 = ${java.home}/lib/rt.jar JavaSE-1.7 = ${java.home}/lib/rt.jar 路径.jre = C:/Programme/Java/jre7 javac源=1.7 javacTarget=1.7
  • 构建的插件的最低执行环境是JavaSE-1.7

  • 用于构建的工作区成功使用了Java 7。

我们能够使用 eclipse 成功运行我们的应用程序的产品。

也许重要的一点是,我们在 PDE build.xml 中使用我们的目标平台(包括来自 Eclipse 3.7.0 rcp_sdk 的一些插件和功能)作为 ${baseLocation}

使用 Eclipse 3.7.1 安装作为 ${baseLocation} 构建成功,但为了高效使用,我们需要目标平台插件来替换应用程序中的一些 Eclipse 插件。

我们通过以下任务在 build.xml 中开始构建:

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

baseLocation 是否可能导致使用错误的编译器? 或者还有其他地方可以定义源级别吗?

我们的 Eclipse 3.7.1 安装中的 PDE 插件已安装,${eclipse.pdebuild.scripts} 设置正确,根据 PDE 目标平台...

We are trying to get a working headless PDE build for our application but compiling fails during the build with the following message:

  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.

       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

  • The workspace used for building uses Java 7 successfully.

We are able to run the product of our application succesfully with 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.

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.

We start the build in the build.xml with this task:

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

Is it possible that the baseLocation causes that the wrong compiler is used?
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 ....

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月依秋水 2024-12-20 11:28:45

使用插件 org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar 而不是“3.7.0 目标平台”中的 org.eclipse.osgi_3.7.0.v20110613.jar 编译和构建成功。

但我不清楚旧的 org.eclipse.osgi-plugin 编译失败的原因。我本来期望出现依赖项解析错误或类似的错误。

如果有人有关于该主题的一些背景信息,我会很高兴。

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.

But the reason why the compilation with the old org.eclipse.osgi-plugin fails is not clear for me. 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.

浅唱々樱花落 2024-12-20 11:28:45

谢谢,通过将 Eclipse Indigo 升级到 SR2 就可以了!

Thank you, it worked by updgrading Eclipse Indigo to SR2 !

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文