close
今天在local使用ant時,出現了奇怪的錯誤


C:\>ant
Unknown argument: -cp
ant [options] [target [target2 [target3] ...]]


我根本迷有輸入-cp阿,怪怪...


Google了一下,找到了些solutions
==============================
Solution 1:
ant failure (1): Unknown argument: -cp
ant [options] [target [target2 [target3] ...]]

This is indicative of this conflict.

To work around this problem, you'll need to comment out the "ANT_HOME=/usr/share/ant" line in /etc/ant.conf

see http://www.activegrid.com/products/eng/docs/faq.html



Soultion 2:
ant --noconfig

should also work without deleting /etc/ant.conf

see http://forum.java.sun.com/thread.jspa?threadID=661323&messageID=3879720


以上兩個方案都是修改或刪除/etc/ant.conf此檔
但實際上我XP上並迷有這個檔案,所以看起來這應該是for Linux 的solution


後來仔細檢查一下我的path
才發現我在灌OC4J時,他自己似乎自動加入了以下路徑
D:\product\10.1.3.1\OracleAS_1\jdk\bin;D:\product\10.1.3.1\OracleAS_1\ant\bin;...
裡面也有一個ant @_@


後來我把OC4J那個ant 路徑移除就好了囉


arrow
arrow
    全站熱搜

    babyincar 發表在 痞客邦 留言(1) 人氣()