使用Launch4j时不会创建Exe

时间:2011-06-08 09:47:29

标签: java executable launch4j

我使用以下代码使用Launch4j,ant脚本创建一个exe文件。 HelloWorld.jar已创建,但未创建HelloWorld.exe。有什么建议吗?

               

   

<copy todir = "install/jre6"> 
<fileset dir="C:\Program Files\Java\jre6"> 
<include name="*"/> 
<include name="bin/**"/> 
<include name="lib/**"/> 
<exclude name="lib/charsets.jar"/> 
<exclude name="lib/ext/sunjce_provider.jar"/> 
<exclude name="bin/rmid.exe"/> 
<exclude name="bin/rmiregistry.exe"/> 
<exclude name="bin/tnameserv.exe"/> 
<exclude name="bin/keytool.exe"/> 
<exclude name="bin/kinit.exe"/> 
<exclude name="bin/klist.exe"/> 
<exclude name="bin/ktab.exe"/> 
<exclude name="bin/policytool.exe"/> 
<exclude name="bin/orbd.exe"/> 
<exclude name="bin/servertool.exe"/> 
<exclude name="bin/java.exe"/> 
<exclude name="bin/javaws.exe"/> 
<exclude name="bin/javacpl.exe"/> 
<exclude name="bin/jucheck.exe"/> 
<exclude name="bin/jusched.exe"/> 
<exclude name="bin/wsdetect.dll"/> 
<exclude name="bin/npjava*.dll"/> 
<exclude name="bin/npoji610.dll"/> 
<exclude name="bin/regutils.dll"/> 
<exclude name="bin/axbridge.dll"/> 
<exclude name="bin/deploy.dll"/> 
<exclude name="bin/jpicom.dll"/> 
<exclude name="bin/javacpl.cpl"/> 
<exclude name="bin/jpiexp.dll"/> 
<exclude name="bin/jpinscp.dll"/> 
<exclude name="bin/jpioji.dll"/> 
<exclude name="bin/jpishare.dll"/> 
<exclude name="lib/deploy.jar"/> 
<exclude name="lib/plugin.jar"/> 
<exclude name="lib/deploy/messages*.properties"/> 
<exclude name="lib/deploy/splash.jpg"/> 
</fileset> 
</copy> 

   

我的蚂蚁Launch4j是

<launch4jConfig>
  <dontWrapJar>true</dontWrapJar>
  <headerType>gui</headerType>
  <jar></jar>
  <outfile>install\HelloWorld.exe</outfile>
  <errTitle></errTitle>
  <cmdLine></cmdLine>
  <chdir>.</chdir>
  <priority>normal</priority>
  <downloadUrl>http://java.com/download</downloadUrl>
  <supportUrl></supportUrl>
  <customProcName>true</customProcName>
  <stayAlive>false</stayAlive>
  <manifest></manifest>
  <icon></icon>
  <classPath>
    <mainClass>HelloWorld</mainClass>
    <cp>lib/HelloWorld.jar</cp>
  </classPath>
  <jre>
    <path>jre6</path>
    <minVersion></minVersion>
    <maxVersion></maxVersion>
    <jdkPreference>preferJre</jdkPreference>
  </jre>
  <messages>
    <startupErr>An error occurred while starting the application.</startupErr>
    <bundledJreErr>This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.</bundledJreErr>
    <jreVersionErr>This application requires a Java Runtime Environment</jreVersionErr>
    <launcherErr>The registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.</launcherErr>
    <instanceAlreadyExistsMsg>An application instance is already running.</instanceAlreadyExistsMsg>
  </messages>
</launch4jConfig>

0 个答案:

没有答案