本文介绍了如何设置JRE在控制台参数ANT权利,而不是在Eclipse中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是一样的,但我不知道如何设置另一个JRE就在蚂蚁!
我需要像路径到BUIL-XML /蚂蚁

My question is the same, but I do not know how to set another JRE right in ant!I need to run scripts in console like "path-to-buil-xml/ant"

我这样做,在Eclipse中,我选择JRE,我需要,但如何将其设置在控制台蚂蚁?结果
什么参数的名称?

I do that in Eclipse and I select JRE that I need, but how to set it in console ant?
What the name of parameter?

eclipse:用于执行ant 变化的jre

我需要建立我的项目的情况时,我还没有安装Eclipse。

I need to build my project in the conditions when I do not have Eclipse.


  1. 现在,我可以当我从C更改JRE编译Eclipse项目:\\ Program Files文件\\的Java \\ jdk1.6.0_27到另一个JRE 1.4。

  2. 我可以做同样不使用Eclipse,但不断变化的JAVA_HOME为JRE 1.4。但是,在目标计算机上我不能改变JAVA_HOME,因为拒绝访问!

如何做到这一点?

推荐答案

在控制台蚂蚁指的是环境变量JAVA_HOME来查找JRE。

In the console ant refers to the environment variable JAVA_HOME to find the JRE.

如果您不希望编辑为windows CMD控制台使用系统设置
(当您关闭控制台,这将重置)

If you don't want to edit the system settings for the windows cmd console use(this will reset when you close the console)

SET JAVA_HOME=PATH_TO_JAVA_HOME

您还可以设置JDK(通过使用javac coomand)的一个参数:

You can also set the jdk(via the javac coomand) an argument to the javac task:

  <javac srcdir="${src}"
         destdir="${build}"
         fork="yes"
         executable="/opt/java/jdk1.1/bin/javac"
  />

边注:

它真正需要的是JDK,如果你需要编译。

Side note:

It really needs to be a jdk, if you need to compile.

这篇关于如何设置JRE在控制台参数ANT权利,而不是在Eclipse中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 14:32