我的操作系统是Win7,我下载了ant-1.9.1 ant解压缩到d:在我设置ANT_HOME后,在CMD中运行I GOT下面的错误:
C:Usershp>ant
Unknown argument: -cp
ant [options] [target [target2 [target3] ...
Options:
-help, -h print this message
以下是我的操作系统设置:
C:Usershp>javac -version
javac 1.7.0_15
C:Usershp>java -version
java version "1.7.0_15"
Java(TM) SE Runtime Environment (build 1.7.0_15-b03)
Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode, sharing)
:
C:Usershp>path
PATH=D:apache-ant-1.9.1bin;D:Python27;E:DevelopAndroidandroid-sdk-windows
platform-tools;E:DevelopAndroidandroid-sdk-windowstools;C:Program Files (
x86)AMD APPbinx86_64;C:Program Files (x86)AMD APPbinx86;C:Program Files
(x86)Javajdk1.7.0_15bin;C:Program FilesCommon FilesMicrosoft SharedWindow
s Live;C:Program Files (x86)Common FilesMicrosoft SharedWindows Live;C:Prog
ram Files (x86)Common FilesNetSarang;C:Windowssystem32;C:Windows;C:Windows
System32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesInte
lWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:Program Files
(x86)ATI TechnologiesATI.ACECore-Static;C:Program Files (x86)Windows Live
Shared;%JAVA_HOME%bin;D:Program FilesTortoiseSVNbin;D:Program FilesTortois
eHg;
C:Usershp>echo %classpath%
.;C:Program Files (x86)Javajdk1.7.0_15libdt.jar;C:Program Files (x86)Java
jdk1.7.0_15libtools.jar;
C:Usershp>echo %ANT_HOME%
D:apache-ant-1.6.1
我读了未知的参数-cp:伪错误与Ant和http://marc.info/?l=ant-user&m=113074222502480虽然我认为这些帖子与我的问题无关!有人能帮忙吗?
前段时间我也遇到过这样的问题
我的解决方案是编辑ant.bat文件(那里有一些参数传递给jre,只是不工作在我的配置)
基米-雷克南Florian