Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6096241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:54:15+00:00 2026-05-23T12:54:15+00:00

I used launch4j, Innosetup to create a installer of my java program. I have

  • 0

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…

Java Virtual Machine Launcher

Could not find the main class :JavaSamp the
program will exit.

Any suggestion pls

build.xml:

<project basedir="." default="build" name="JavaSamp">
    <target name="build">
        <mkdir dir="classes" />     
        <mkdir dir="install/lib" />
        <jar destfile="install/lib/JavaSamp.jar" basedir="classes" />       
        <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>
        <exec executable="C:\Program Files\Launch4j\launch4jc.exe">
            <arg value="${basedir}\installerLaunch4j.xml" />
        </exec>
        <exec executable="C:\Program Files\Inno Setup 5\ISCC.exe">
            <arg value="${basedir}\InnoSetup.iss" />
        </exec>         
        <echo message="JavaSampSetup.exe ready" />
    </target>
</project>

installerLaunch4j.xml:

<launch4jConfig>
  <dontWrapJar>true</dontWrapJar>
  <headerType>gui</headerType>
  <jar></jar>
  <outfile>install\JavaSamp.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>JavaSamp</mainClass>
    <cp>lib/DataBaseHelper.jar</cp>
    <cp>lib/WriteHelper.jar</cp>
    <cp>lib/FileEncryption.jar</cp>
    <cp>lib/JavaDemo.jar</cp>
    <cp>lib/SendEmail.jar</cp>
    <cp>lib/JavaSamp.jar</cp>
    <cp>lib/JavaSamp$1.jar</cp>
    <cp>lib/JavaSamp$2.jar</cp>
    <cp>lib/JavaSamp$3.jar</cp>
    <cp>lib/JavaSamp$4.jar</cp>
    <cp>lib/JavaSamp$Myemail.jar</cp>
    <cp>lib/JavaSamp$Myemail$1.jar</cp>
    <cp>lib/JavaSamp$Myemail$2.jar</cp>
    <cp>lib/JavaSamp$Myemail$3.jar</cp>
    <cp>lib/JavaSamp$Myemail$4.jar</cp>
    <cp>lib/JavaSamp$OpenL.jar</cp>
    <cp>lib/JavaSamp$Samp.jar</cp>
    <cp>lib/JavaSamp$Samp$1.jar</cp>
    <cp>lib/JavaSamp$Samp1.jar</cp>
    <cp>lib/JavaSamp$Samp1$1.jar</cp>
    <cp>lib/jxl-2.6.jar</cp>
    <cp>lib/ant.jar</cp>
    <cp>lib/sys_data.db</cp>
    <cp>lib/dnsns.jar</cp>
    <cp>lib/dsn.jar</cp>
    <cp>lib/encrypt.data</cp>
    <cp>lib/imap.jar</cp>
    <cp>lib/javaws.jar</cp>
    <cp>lib/jce.jar</cp>
    <cp>lib/jsse.jar</cp>
    <cp>lib/localedata.jar</cp>
    <cp>lib/mail.jar</cp>
    <cp>lib/mailapi.jar</cp>
    <cp>lib/pop3.jar</cp>
    <cp>lib/private.der</cp>
    <cp>lib/public.der</cp>
    <cp>lib/rt.jar</cp>
    <cp>lib/secure.data</cp>
    <cp>lib/SendEmail.jar</cp>
    <cp>lib/smtp.jar</cp>
    <cp>lib/sqlitejdbc-v056.jar</cp>
    <cp>lib/sunjce_provider.jar</cp>
    <cp>lib/sunmscapi.jar</cp>
    <cp>lib/sunpkcs11.jar</cp>
    <cp>lib/tools.jar</cp>
    <cp>lib/unencryptedFile</cp>
    <cp>sys_data.db</cp>
    <cp>lib/install_details.xls</cp>
    <cp>install_details.xls</cp>
  </classPath>
  <jre>
    <path>jre6</path>
    <minVersion></minVersion>
    <maxVersion></maxVersion>
    <jdkPreference>preferJre</jdkPreference>
  </jre>
  <versionInfo>
    <fileVersion>1.0.0.0</fileVersion>
    <txtFileVersion>1.0</txtFileVersion>
    <fileDescription>JavaSamp</fileDescription>
    <copyright>CopyRight (c) 2011 FSP</copyright>
    <productVersion>1.0.0.0</productVersion>
    <txtProductVersion>1.0</txtProductVersion>
    <productName>JavaSamp</productName>
    <companyName>FSP</companyName>
    <internalName>JavaSamp final</internalName>
    <originalFilename>JavaSamp.exe</originalFilename>
  </versionInfo>
</launch4jConfig>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:54:15+00:00Added an answer on May 23, 2026 at 12:54 pm

    As an experiment, try creating a JAR file for your application, and try running it as follows:

    java -cp your.jar JavaSamp
    

    If that works, then the problem is something to do with the way that you created that installer.


    FWIW, you do not need to write java.lang.String. Just String will do fine.


    UPDATE

    That exception indicates that the class file is mangled … or more likely that it is not a Java class file at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Running on Linux, I've used launch4j to package an exe. I copy the exe
Used http://www.ilbcfreeware.org/software.html - I only get static from the files that ilbc_test.exe creates. Does
I used the LINQ to SQL designer in Visual Studio to create an object
I used to work with eclipse for nearly all the languages I need. I'm
Used as a scripting language, does Scala have some sort of include directive, or
Used to develop Portlets and JPS's, so have a dilemma. task: display <h:dataTable> only
Code Used: m_pButton->Create(LABC, WS_CHILD | WS_VISIBLE| BM_SETIMAGE,CRect(0,0,100,100),this,ID_BUTTON1); m_pButton->SetIcon(::LoadIcon(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDI_ICON1))); //above Code show neither showing
I used to have a Buy Now button that would go through PayPal, and
Having used optional parameters in a few classes here and there, I'm starting to
I notice in several API's, that you may create a struct which is used

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.