A wrapped .exe with launch4j and jdk8 takes a lot of time. Using jdk7 instead starts almost instantly

I have the following problem:

I used launch4j configuration to create a wrapped executable from my runable jar using the associated jdk / jre7 for some time.

A program (launched with this .exe) starts almost immediately with jdk7. Now I had to switch to jdk8, which leads to a VERY slow start. Everything works fine, this is not a problem, but the process of starting this .exe takes ~ 1-2 minutes, and I just don’t understand why.

Launching the application from eclipse (using the same JDK8) starts in a few seconds (as it should be!).

So ... Any ideas what might cause this and how can I fix it?

Here is my current l4j.xml:

<?xml version="1.0" encoding="UTF-8"?>
<launch4jConfig>
  <dontWrapJar>false</dontWrapJar>
  <headerType>gui</headerType>
  <jar>C:\Users\user\workspace\DataUpdater\release\bin\DataUpdater-v2.6.1.jar</jar>
  <outfile>C:\Users\user\workspace\DataUpdater\release\DataUpdater.exe</outfile>
  <errTitle>DataUpdater: Kein kompatibles JRE gefunden</errTitle>
  <cmdLine></cmdLine>
  <chdir>.</chdir>
  <priority>high</priority>
  <downloadUrl>http://java.com/download</downloadUrl>
  <supportUrl>https://www.google.de/</supportUrl>
  <stayAlive>true</stayAlive>
  <restartOnCrash>false</restartOnCrash>
  <manifest></manifest>
  <icon>C:\Users\user\workspace\DataUpdater\res\icons\DataUpdater.ico</icon>
  <singleInstance>
    <mutexName>DataUpdater v2.6.1</mutexName>
    <windowTitle>DataUpdater v2.6.1</windowTitle>
  </singleInstance>
  <jre>
    <path>./bundeled/jre1.8.0_92</path>
    <bundledJre64Bit>true</bundledJre64Bit>
    <bundledJreAsFallback>false</bundledJreAsFallback>
    <minVersion>1.8.0</minVersion>
    <maxVersion>1.8.0_92</maxVersion>
    <jdkPreference>jdkOnly</jdkPreference>
    <runtimeBits>64</runtimeBits>
    <initialHeapPercent>33</initialHeapPercent>
    <maxHeapPercent>80</maxHeapPercent>
    <opt>-Dfile.encoding=UTF-8</opt>
  </jre>
  <versionInfo>
    <fileVersion>2.6.1.0</fileVersion>
    <txtFileVersion>v2.6.1</txtFileVersion>
    <fileDescription>DataUpdater: Anwendung zum aktualisieren von -Datensätzen mittels externer Datenquellen wie Excel-Tabellen direkt auf Datenbankebene.</fileDescription>
    <copyright>Max Mustermann</copyright>
    <productVersion>2.6.1.0</productVersion>
    <txtProductVersion>v2.6.1</txtProductVersion>
    <productName>DataUpdater</productName>
    <companyName>Max Mustermann</companyName>
    <internalName>DataUpdater v2.6.1</internalName>
    <originalFilename>DataUpdater.exe</originalFilename>
  </versionInfo>
  <messages>
    <startupErr>DataUpdater konnte nicht gestartet werden. </startupErr>
    <bundledJreErr>DataUpdater erwartet ein bundled JRE. Dieses wurde nicht gefunden oder ist beschädigt.</bundledJreErr>
    <jreVersionErr>DataUpdater benötigt eine Java Laufzeitumgebung. Diese konnte nicht gefunden werden.
Bitte stellen Sie sicher, dass Java 8 auf Ihrem System installiert ist.</jreVersionErr>
    <launcherErr>Die Windows Registry verweist auf eine nicht mehr vorhandene oder beschädigte Java Installation.</launcherErr>
    <instanceAlreadyExistsMsg>DataUpdater wird bereits ausgeführt. 
Es ist immer nur eine DataUpdater-Instanz gleichzeitig erlaubt.</instanceAlreadyExistsMsg>
  </messages>
</launch4jConfig>

: , ...

: , . jdk8 - , l4j. , , - , eclipse, jdk8.

+1
1

, "" launch4j Java 8, log4j Java 8.

- , , .

0

Source: https://habr.com/ru/post/1672450/


All Articles