Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed help to fix JVM error, related to launch4j
    text
    copied!<p>I used launch4j, Innosetup to create a installer of my java program. I have 6 classes. I added all the classes and required jar in launch4j. The exe get created through launch4j. I created an installer using innosetup. When I try to run the installer, the following error occurs...</p> <blockquote> <p>Java Virtual Machine Launcher </p> <p>Could not find the main class :JavaSamp the program will exit.</p> </blockquote> <p>Any suggestion pls</p> <p>build.xml:</p> <pre><code>&lt;project basedir="." default="build" name="JavaSamp"&gt; &lt;target name="build"&gt; &lt;mkdir dir="classes" /&gt; &lt;mkdir dir="install/lib" /&gt; &lt;jar destfile="install/lib/JavaSamp.jar" basedir="classes" /&gt; &lt;copy todir="install/jre6"&gt; &lt;fileset dir="C:\Program Files\Java\jre6"&gt; &lt;include name="*" /&gt; &lt;include name="bin/**" /&gt; &lt;include name="lib/**" /&gt; &lt;exclude name="lib/charsets.jar" /&gt; &lt;exclude name="lib/ext/sunjce_provider.jar" /&gt; &lt;exclude name="bin/rmid.exe" /&gt; &lt;exclude name="bin/rmiregistry.exe" /&gt; &lt;exclude name="bin/tnameserv.exe" /&gt; &lt;exclude name="bin/keytool.exe" /&gt; &lt;exclude name="bin/kinit.exe" /&gt; &lt;exclude name="bin/klist.exe" /&gt; &lt;exclude name="bin/ktab.exe" /&gt; &lt;exclude name="bin/policytool.exe" /&gt; &lt;exclude name="bin/orbd.exe" /&gt; &lt;exclude name="bin/servertool.exe" /&gt; &lt;exclude name="bin/java.exe" /&gt; &lt;exclude name="bin/javaws.exe" /&gt; &lt;exclude name="bin/javacpl.exe" /&gt; &lt;exclude name="bin/jucheck.exe" /&gt; &lt;exclude name="bin/jusched.exe" /&gt; &lt;exclude name="bin/wsdetect.dll" /&gt; &lt;exclude name="bin/npjava*.dll" /&gt; &lt;exclude name="bin/npoji610.dll" /&gt; &lt;exclude name="bin/regutils.dll" /&gt; &lt;exclude name="bin/axbridge.dll" /&gt; &lt;exclude name="bin/deploy.dll" /&gt; &lt;exclude name="bin/jpicom.dll" /&gt; &lt;exclude name="bin/javacpl.cpl" /&gt; &lt;exclude name="bin/jpiexp.dll" /&gt; &lt;exclude name="bin/jpinscp.dll" /&gt; &lt;exclude name="bin/jpioji.dll" /&gt; &lt;exclude name="bin/jpishare.dll" /&gt; &lt;exclude name="lib/deploy.jar" /&gt; &lt;exclude name="lib/plugin.jar" /&gt; &lt;exclude name="lib/deploy/messages*.properties" /&gt; &lt;exclude name="lib/deploy/splash.jpg" /&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;exec executable="C:\Program Files\Launch4j\launch4jc.exe"&gt; &lt;arg value="${basedir}\installerLaunch4j.xml" /&gt; &lt;/exec&gt; &lt;exec executable="C:\Program Files\Inno Setup 5\ISCC.exe"&gt; &lt;arg value="${basedir}\InnoSetup.iss" /&gt; &lt;/exec&gt; &lt;echo message="JavaSampSetup.exe ready" /&gt; &lt;/target&gt; &lt;/project&gt; </code></pre> <p>installerLaunch4j.xml:</p> <pre class="lang-xml prettyprint-override"><code>&lt;launch4jConfig&gt; &lt;dontWrapJar&gt;true&lt;/dontWrapJar&gt; &lt;headerType&gt;gui&lt;/headerType&gt; &lt;jar&gt;&lt;/jar&gt; &lt;outfile&gt;install\JavaSamp.exe&lt;/outfile&gt; &lt;errTitle&gt;&lt;/errTitle&gt; &lt;cmdLine&gt;&lt;/cmdLine&gt; &lt;chdir&gt;.&lt;/chdir&gt; &lt;priority&gt;normal&lt;/priority&gt; &lt;downloadUrl&gt;http://java.com/download&lt;/downloadUrl&gt; &lt;supportUrl&gt;&lt;/supportUrl&gt; &lt;customProcName&gt;true&lt;/customProcName&gt; &lt;stayAlive&gt;false&lt;/stayAlive&gt; &lt;manifest&gt;&lt;/manifest&gt; &lt;icon&gt;&lt;/icon&gt; &lt;classPath&gt; &lt;mainClass&gt;JavaSamp&lt;/mainClass&gt; &lt;cp&gt;lib/DataBaseHelper.jar&lt;/cp&gt; &lt;cp&gt;lib/WriteHelper.jar&lt;/cp&gt; &lt;cp&gt;lib/FileEncryption.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaDemo.jar&lt;/cp&gt; &lt;cp&gt;lib/SendEmail.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$1.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$2.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$3.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$4.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$Myemail.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$Myemail$1.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$Myemail$2.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$Myemail$3.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$Myemail$4.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$OpenL.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$Samp.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$Samp$1.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$Samp1.jar&lt;/cp&gt; &lt;cp&gt;lib/JavaSamp$Samp1$1.jar&lt;/cp&gt; &lt;cp&gt;lib/jxl-2.6.jar&lt;/cp&gt; &lt;cp&gt;lib/ant.jar&lt;/cp&gt; &lt;cp&gt;lib/sys_data.db&lt;/cp&gt; &lt;cp&gt;lib/dnsns.jar&lt;/cp&gt; &lt;cp&gt;lib/dsn.jar&lt;/cp&gt; &lt;cp&gt;lib/encrypt.data&lt;/cp&gt; &lt;cp&gt;lib/imap.jar&lt;/cp&gt; &lt;cp&gt;lib/javaws.jar&lt;/cp&gt; &lt;cp&gt;lib/jce.jar&lt;/cp&gt; &lt;cp&gt;lib/jsse.jar&lt;/cp&gt; &lt;cp&gt;lib/localedata.jar&lt;/cp&gt; &lt;cp&gt;lib/mail.jar&lt;/cp&gt; &lt;cp&gt;lib/mailapi.jar&lt;/cp&gt; &lt;cp&gt;lib/pop3.jar&lt;/cp&gt; &lt;cp&gt;lib/private.der&lt;/cp&gt; &lt;cp&gt;lib/public.der&lt;/cp&gt; &lt;cp&gt;lib/rt.jar&lt;/cp&gt; &lt;cp&gt;lib/secure.data&lt;/cp&gt; &lt;cp&gt;lib/SendEmail.jar&lt;/cp&gt; &lt;cp&gt;lib/smtp.jar&lt;/cp&gt; &lt;cp&gt;lib/sqlitejdbc-v056.jar&lt;/cp&gt; &lt;cp&gt;lib/sunjce_provider.jar&lt;/cp&gt; &lt;cp&gt;lib/sunmscapi.jar&lt;/cp&gt; &lt;cp&gt;lib/sunpkcs11.jar&lt;/cp&gt; &lt;cp&gt;lib/tools.jar&lt;/cp&gt; &lt;cp&gt;lib/unencryptedFile&lt;/cp&gt; &lt;cp&gt;sys_data.db&lt;/cp&gt; &lt;cp&gt;lib/install_details.xls&lt;/cp&gt; &lt;cp&gt;install_details.xls&lt;/cp&gt; &lt;/classPath&gt; &lt;jre&gt; &lt;path&gt;jre6&lt;/path&gt; &lt;minVersion&gt;&lt;/minVersion&gt; &lt;maxVersion&gt;&lt;/maxVersion&gt; &lt;jdkPreference&gt;preferJre&lt;/jdkPreference&gt; &lt;/jre&gt; &lt;versionInfo&gt; &lt;fileVersion&gt;1.0.0.0&lt;/fileVersion&gt; &lt;txtFileVersion&gt;1.0&lt;/txtFileVersion&gt; &lt;fileDescription&gt;JavaSamp&lt;/fileDescription&gt; &lt;copyright&gt;CopyRight (c) 2011 FSP&lt;/copyright&gt; &lt;productVersion&gt;1.0.0.0&lt;/productVersion&gt; &lt;txtProductVersion&gt;1.0&lt;/txtProductVersion&gt; &lt;productName&gt;JavaSamp&lt;/productName&gt; &lt;companyName&gt;FSP&lt;/companyName&gt; &lt;internalName&gt;JavaSamp final&lt;/internalName&gt; &lt;originalFilename&gt;JavaSamp.exe&lt;/originalFilename&gt; &lt;/versionInfo&gt; &lt;/launch4jConfig&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload