launch4j wrapper starts twice

200 views Asked by At

I wrapped my java application with launch4j.

When I start the launcher, the app starts as usual. after ca. 5 seconds the application closes and restarts without any visible reason.

Here the configuration file:

<?xml version="1.0" encoding="UTF-8"?>
<launch4jConfig>
<dontWrapJar>true</dontWrapJar>
  <headerType>gui</headerType>
<jar>.\app\getdown-1.4.jar</jar>
  <outfile>C:\dev\repos\myproject\build\getdown\launch.exe</outfile>
<errTitle>Fehler - myproject</errTitle>
  <cmdLine>./app</cmdLine>
  <chdir></chdir>
<priority>normal</priority>
  <downloadUrl>http://java.com/download</downloadUrl>
  <supportUrl></supportUrl>
<stayAlive>false</stayAlive>
  <restartOnCrash>false</restartOnCrash>
<manifest></manifest>
  <icon>C:\dev\repos\myproject\build\getdown\app\favicon.ico</icon>
<singleInstance>
<mutexName>myproject</mutexName>
    <windowTitle>myproject</windowTitle>
</singleInstance>
  <jre>
    <path></path>
<bundledJre64Bit>false</bundledJre64Bit>
    <minVersion>1.7.0</minVersion>
<maxVersion></maxVersion>
    <jdkPreference>preferJre</jdkPreference>
<runtimeBits>64/32</runtimeBits>
  </jre>
</launch4jConfig>
1

There are 1 answers

1
StawiaszPiwo On

Well, it's kinda silly, but in my case it was Avast Cybersomething - antivirus secure environment. Make sure your app is not running in similar, isolated env before it runs normaly.