How can I configure a Hudson job to use a specific JDK?

后端 未结 9 1864
情话喂你
情话喂你 2020-12-05 06:44

I have a number of projects running on a Hudson slave. I\'d like one of them to run Ant under Java6, rather than the default (which is Java5 in my environment).

In t

9条回答
  •  爱一瞬间的悲伤
    2020-12-05 07:38

    you can use like this.

    in batch command window intially u can set the variable name JAVA_HOME, Assign this custom variable name to PATH variable. then u can call an ant script to choose specific file.

    Example:

    set JAVA_HOME=C:/java/jdk1.6.1

    PATH=%JAVA_HOME%/bin;%PATH%

    ant build.xml

提交回复
热议问题