java ant 安装,安装Ant来使用JDK不同从一个在指定JAVA_HOME

So for reason of running many projects, I don't want to change JAVA_HOME variable (1.6) but I would like ant to run and use 1.5 JDK.

I have manage to do this from Eclipse IDE (so it can be done), so when running from Eclipse IDE it will use 1.5 since I specified JDK 1.5 as project's JDK.

To make long story short I want Ant when run from cmd prompt to use JDK 1.5.

Seems pretty easy but I am having trouble finding out the way to do it.

P.S.

Reason I need this to work from command prompt is because ant build is quite long 3-4 mins and my Eclipse IDE gets frozen while it's running. Three minutes waits are simply not acceptable :)

Thanks all.

解决方案

You can write your own script, called ant2 or similar, to execute ant from the JDK that you want and add it into the PATH.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值