Exception in Launch4j

Manikandan picture Manikandan · Jun 9, 2011 · Viewed 9.6k times · Source

I have the following instructions in my build.xml, and I am getting the following exception.

launch4j: net.sf.launch4j.ExecException: Exec failed (1): C:\Program Files\Launch4j\bin\windres.exe --preprocessor=type -J rc -O coff -F pe-i386 C:\Windows\TEMP\launch4j2603642297702639520rc C:\Windows\TEMP\launch4j1179691608441365102o

This is my build script:

<project basedir="."  default="build" name="Bienvenue"> 
   <!-- Crée le fichier d'installation BienvenueSetup.exe --> 
  <target name="build"> 
  <!-- Création du dossier classes --> 
  <mkdir dir="classes"/> 

  <!-- Compilation des classes du programme --> 
  <javac srcdir="src" destdir="classes" /> 

  <!-- Création du dossier install/lib --> 
  <mkdir dir="install/lib"/> 

  <!-- Création du fichier Bienvenue.jar --> 
  <jar destfile="install/lib/Bienvenue.jar" basedir="classes"/> 

  <!-- Suppression du dossier classes --> 
  <delete dir="classes"/> 

  <!-- Copie du JRE dans le dossier install/jre6 en excluant les fichiers 
   inutiles mentionnés dans le fichier README.TXT du JRE 
   (attention il faut garder le fichier bin/javaw.exe du JRE) --> 
  <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 > 

   <!-- Création du fichier Bienvenue.exe avec Launch4j --> 
  <exec executable="C:\Program Files\Launch4j\launch4jc.exe"> 
  <arg value="${basedir}\installerLaunch4j.xml"/> 
  </exec > 

   <!-- Création du fichier BienvenueSetup.exe avec Inno Setup --> 
  <exec executable="C:\Program Files\Inno Setup 5\ISCC.exe"> 
  <arg value="${basedir}\installerInnoSetup.iss"/> 
  </exec > 

   <!-- Suppression du dossier install --> 
  <delete dir="install/"/> 

     <echo message="BienvenueSetup.exe ready"/> 
  </target > 
  </project > 

Can anyone help me figure out what I am doing wrong?

Answer

CAMOBAP picture CAMOBAP · Dec 18, 2012

Show your installerLaunch4j.xml config please. I my case problem was in wrong icon format (I was used png instead ico).