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 8363705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:14:57+00:00 2026-06-09T12:14:57+00:00

I am making 2 java software build in exe by the launch4j-maven plugin.The plugins-parts

  • 0

I am making 2 java software build in exe by the launch4j-maven plugin.The plugins-parts in both pom.xml are the same (except for the apps name).
Strangly when i launch the first exe, lauch4j do it right: i can see myapps.exe running and in the log i see the copy:

Using 64-bit runtime.  
Check launcher: C:\Program Files\Java\jre7\bin\javaw.exe (OK)  
Copy:       C:\Program Files\Java\jre7\bin\javaw.exe -> C:\Program          Files\Java\jre7\launch4j-tmp\NumSyncManager.exe  
Heap -Xms:  5 MB / 0%, Free: 892 MB, Heap size: 5 MB  
Heap -Xmx:  15 MB / 0%, Free: 892 MB, Heap size: 15 MB  
...  
Launcher:   C:\Program Files\Java\jre7\launch4j-tmp\NumSyncManager.exe  
Launcher args:  -Xms5m -Xmx15m -classpath "C:\Program iles\..."   
Args length:    474/32768 chars  
Exit code:  0  

But when i launch the second one, i see javaw.exe instead of myapps2.exe and in the log I clearly see that it doesn’t copy the launcher:

Using 64-bit runtime.  
Check launcher: C:\Program Files\Java\jre7\bin\javaw.exe (OK)  
Heap -Xms:  10 MB / 0%, Free: 951 MB, Heap size: 10 MB  
Heap -Xmx:  500 MB / 0%, Free: 951 MB, Heap size: 500 MB  
...  
Launcher:   C:\Program Files\Java\jre7\bin\javaw.exe  
Launcher args:  -Xms10m -Xmx500m -classpath "C:\Program..."  
Args length:    817/32768 chars  
Exit code:  0  

here the xml file of the working apps:

                    <configuration>
                        <headerType>gui</headerType>
                        <outfile>target/${winName}.exe</outfile>
                        <jar>target/${artifactId}-${version}-jar-with-dependencies.jar</jar> <!-- 'shaded' is the value set on shadedClassifierName above -->
                        <errTitle>Erreur lors du lancement du logiciel</errTitle>
                        <classPath>
                            <mainClass>fr.core.BootStrap</mainClass>
                        </classPath>
                        <singleInstance>
                            <mutexName>${winName}</mutexName>
                            <windowTitle>${winName}</windowTitle>
                        </singleInstance>
                        <jre>
                            <minVersion>1.6.0</minVersion>
                            <initialHeapSize>50</initialHeapSize>
                            <maxHeapSize>100</maxHeapSize>
                        </jre>
                        <versionInfo>
                            <fileVersion>${version}.0</fileVersion>
                            <txtFileVersion>${version}.0</txtFileVersion>
                            <fileDescription>Tool Manager</fileDescription>
                            <copyright>C</copyright>
                            <productVersion>${version}.0</productVersion>
                            <txtProductVersion>${version}.0</txtProductVersion>
                            <productName>${winName}</productName>
                            <internalName>${winName}</internalName>
                            <originalFilename>${winName}.exe</originalFilename>
                        </versionInfo>
                    </configuration>

And here is the xml of the non-working apps

                       <headerType>gui</headerType>
                        <outfile>target/${winName}.exe</outfile>
                        <jar>target/${artifactId}-${version}-jar-with-dependencies.jar</jar> <!-- 'shaded' is the value set on shadedClassifierName above -->
                        <errTitle>Erreur lors du lancement du logiciel</errTitle>
                        <classPath>  
                          <mainClass>fr.boot.BootStrap</mainClass>
                        </classPath>
                        <singleInstance>
                            <mutexName>${winName}</mutexName>
                            <windowTitle>${winName}</windowTitle>
                        </singleInstance>
                        <dontWrapJar>false</dontWrapJar>
                        <customProcName>false</customProcName>
                        <jre>
                            <minVersion>1.6.0</minVersion>
                            <initialHeapSize>10</initialHeapSize>
                            <maxHeapSize>500</maxHeapSize>
                        </jre>
                        <versionInfo>
                            <fileVersion>${winVersion}.0</fileVersion>
                            <txtFileVersion>${winVersion}.0</txtFileVersion>
                            <fileDescription>Tool</fileDescription>
                            <copyright>c</copyright>
                            <productVersion>${winVersion}.0</productVersion>
                            <txtProductVersion>${winVersion}.0</txtProductVersion>
                            <productName>${winName}</productName>
                            <internalName>${winName}</internalName>
                            <originalFilename>${winName}.exe</originalFilename>
                        </versionInfo>
                    </configuration>

I launch them using the same Windows account, there is no rights problem. So i dont know how to solve this.

I have tried to use Launch4j.exe instead of maven plugin here is my export of configuration. Its still doesn’t work:

<launch4jConfig>
  <dontWrapJar>false</dontWrapJar>
  <headerType>gui</headerType>
  <jar>C:\apps-0.0.1-jar-with-dependencies.jar</jar>
  <outfile>C:\apps.exe</outfile>
  <errTitle></errTitle>
  <cmdLine></cmdLine>
  <chdir></chdir>
  <priority>normal</priority>
  <downloadUrl>http://java.com/download</downloadUrl>
  <supportUrl></supportUrl>
  <customProcName>false</customProcName>
  <stayAlive>false</stayAlive>
  <manifest></manifest>
  <icon></icon>
  <singleInstance>
    <mutexName>apps</mutexName>
    <windowTitle>apps</windowTitle>
  </singleInstance>
  <classPath>
    <mainClass>fr.core.BootStrap</mainClass>
    <cp>fr.core.BootStrap</cp>
  </classPath>
  <jre>
    <path></path>
    <minVersion>1.6.0</minVersion>
    <maxVersion></maxVersion>
    <jdkPreference>preferJre</jdkPreference>
    <opt>-Denv.java.home=&quot;%JAVA_HOME%&quot;</opt>
  </jre>
  <versionInfo>
    <fileVersion>1.0.0.0</fileVersion>
    <txtFileVersion>1.0.0.0</txtFileVersion>
    <fileDescription>desc</fileDescription>
    <copyright>e</copyright>
    <productVersion>1.0.0.0</productVersion>
    <txtProductVersion>1.0.0.0</txtProductVersion>
    <productName>apps.exe</productName>
    <companyName>appsComp</companyName>
    <internalName>apps</internalName>
    <originalFilename>apps.exe</originalFilename>
  </versionInfo>
</launch4jConfig>

Thanks

  • 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-06-09T12:14:58+00:00Added an answer on June 9, 2026 at 12:14 pm

    To launch your app with custom process name in launch4J config file must be written

    <customProcName>true</customProcName>
    

    In your non-working app config this parameter is false.
    Try to change it first.

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

Sidebar

Related Questions

I am making a distributed java app for which I need both parts of
Im am making an Java SWT program that is required to run on both
I am making Scouting Software (in Java) for my FRC robotics team. Scouting is
I'm making a Java application with an application-logic-thread and a database-access-thread. Both of them
I'm making my own custom server software for a game in Java (the game
I am making software that will need to dynamically create java bytecode, and possibly
I am making a java applet player. It includes Java.Media package, and I am
I'm making a Java program that accesses a website, which depends on handing out
I'm making a Java program that can solve the roots using the quadratic equation
I am having an issue in an interface I am making in Java. It

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.