我将Python配置为路径变量,下面是路径变量内容
%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;%systemroot%\system32\windowspowershell\v1.0\;C:\Python27\;c:\program files\java\jdk1.7.0_03\bin;.;c:\program files\tortoisesvn\bin;d:\apache-ant-1.8.3\bin;c:\program files\ibm\gsk8\lib;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;%M2_HOME%\bin;C:\Program Files\Lenovo\Bluetooth Software\;
为什么我配置 Python 意味着,我正在使用 ant build 和 installj 创建 exe 文件
<target name="installer.izpack.exe" depends="installer.izpack" description="build release executable izpack installer">
<exec executable="python" failonerror="true">
<arg line="${installer.izpack.dir}/utils/wrappers/izpack2exe/izpack2exe.py"/>
<arg line="--file=${basedir}/installer/EasyIT-installer.jar"/>
<arg line="--output=${basedir}/installer/EasyIT-installer.exe"/>
<arg line="--no-upx"/>
</exec>
</target>
但是在构建应用程序时出现以下错误:
installer.izpack.exe:
[exec] python: can't open file 'C:\Program': [Errno 2] No such file or directory
BUILD FAILED
E:\Java Projects\Spark Projects\EastIT - Copy\build\build.xml:873: exec returned: 2
Total time: 51 seconds