eclipse:更改用于运行 ant 的 jre

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4041023/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 15:14:40  来源:igfitidea点击:

eclipse: change jre that is used to run ant

javaeclipseant32bit-64bit

提问by clamp

How do I change the JRE (for example, to go from a from 64bit to 32bit version) that is used to run ant from inside eclipse?

如何更改用于从 eclipse 内部运行 ant 的 JRE(例如,从 64 位版本变为 32 位版本)?

采纳答案by Romain Linsolas

I am not sure that you can do that in a global way. However, it is possible to choose your JRE when you run Anton a specific project:

我不确定您能否以全球方式做到这一点。但是,当您Ant在特定项目上运行时,可以选择您的 JRE :

Go in the Propertiesof your project, then select Buildersand Ant Builder. In the properties for this builder, go in the JREtab, and choose an Separate JRE.

进入Properties您的项目,然后选择BuildersAnt Builder。在此构建器的属性中,进入JRE选项卡,然后选择一个Separate JRE.

Another solution is to specify the JRE used directly in your build.xmlfile.

另一种解决方案是指定直接在您的build.xml文件中使用的 JRE 。

回答by mikej

  • From the menu, choose Run -> External Tools -> External Tools Configurations (or use the equivalent toolbar button toolbar button)
  • Select your Ant Build
  • Click the JRE tab (external tools tabs), click Separate JRE and pick the required JRE
  • 从菜单中,选择运行 -> 外部工具 -> 外部工具配置(或使用等效的工具栏按钮工具栏按钮
  • 选择您的 Ant 构建
  • 单击 JRE 选项卡 ( external tools tabs),单击分离 JRE 并选择所需的 JRE