编程语言
首页 > 编程语言> > java-在macosx上将launch4j作为蚂蚁构建任务运行

java-在macosx上将launch4j作为蚂蚁构建任务运行

作者:互联网

我试图在macosx上将launch4j作为构建任务运行,但是我收到以下异常:

/Users/myname/Desktop/build/buildarms2jar.xml:67: net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/Users/myname/Desktop/launch4j/launch4j/bin/windres": error=2, No such file or directory

文件路径正确.我读到这可能是风向运行问题,但我找不到解决方案.有谁知道如何解决这一问题?

蚂蚁档案:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar" name="Create Runnable Jar for Project ARMS2 with Jar-in-Jar Loader">
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
<!--ANT 1.7 is required -->
<property name="releasedest" value="../release/"/> 
<property name="data" value="../data/" />
<property name="config" value="../config/" />
<property name="launch4j.dir" location="../launch4j" />
<property name="version" value="1.0.0" />
<property name="textfileversion" value="1.0.0" />

<target name="create_run_jar">
    <jar destfile="${releasedest}test.jar">
        <manifest>
            <attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
            <attribute name="Rsrc-Main-Class" value="com.domain.RadialUIController"/>
            <attribute name="Class-Path" value="."/>
            <attribute name="Rsrc-Class-Path" value="./ worldwind.jar gluegen-rt.jar jogl.jar AnimatedTransitions-0.11.jar TimingFramework-1.0.jar commons-lang-2.5.jar commons-io-2.0.1.jar SiteMetaData.jar xbean.jar substance.jar trident.jar batik-awt-util.jar batik-dom.jar batik-svg-dom.jar batik-svggen.jar batik-util.jar batik-xml.jar icepdf-core.jar icepdf-viewer.jar ridl.jar unoloader.jar jurt.jar java_uno.jar juh.jar officebean.jar unoil.jar"/>
        </manifest>
    </jar>
</target>

<copy todir="${releasedest}">
    <fileset dir="${data}" />
</copy>
<copy todir="${releasedest}/config">
    <fileset dir="${config}" />
</copy>

<copy file="DataSetup.txt" todir="${releasedest}" />

<taskdef name="launch4j"
    classname="net.sf.launch4j.ant.Launch4jTask"
    classpath="${launch4j.dir}/launch4j/launch4j.jar
        :${launch4j.dir}/launch4j/lib/xstream.jar" />

<launch4j configFile="${launch4j.dir}/TestConfig.xml" jar="${releasedest}/test.jar" />

<copy file="test.exe" todir="${releasedest}" />

</project>

解决方法:

好吧,这很尴尬…我的launch4j发行版错误.

标签:osx-snow-leopard,launch4j,java,ant
来源: https://codeday.me/bug/20191102/1992623.html