0

I'm trying to generate executable file for my javafx application. I've generatd jar which I can run within java -jar file.jar command. I've used Launch4j for that (but also jsmooth app). The problem is, fine it generates exe file, but when I try to run this app it does nothing, something is loading for less than 0.5 sec and nothing appears, what can be wrong?

Config:

enter image description here

I dont know what should I paste else as I can run jar properly so the jar is not corrupted.

//edit When I tried to run executive jar by double clicking, this windows showed. (edited question). enter image description here

miksz1
  • 31
  • 1
  • 11
  • How is the classpath configured in Launch4j, is it pointing to the correct main class? – sorifiend Nov 30 '20 at 12:17
  • Possibly helpful for console applications: [Launch4J executable not executing as expected](https://stackoverflow.com/questions/27192240/launch4j-executable-not-executing-as-expected) – sorifiend Nov 30 '20 at 12:19
  • @sorifiend When I tried to run executive jar by double clicking, this windows showed. (edited question), and yes it is pointing to the correct main class – miksz1 Nov 30 '20 at 12:57
  • Probably the JRE being bundled in the exe is not the same version as the one on your system (so, for example, the bundled JRE might not include JavaFX). What version information do you get from `java -version` on the command line? I don't use Launch4j, but you should try to ensure it bundles the same Java version as the one from the command line. – James_D Nov 30 '20 at 15:01
  • @James_D 1.8.0.271 so all should be fine. – miksz1 Nov 30 '20 at 16:16
  • And you're sure that's what Launch4J is putting in the .exe? – James_D Nov 30 '20 at 17:38
  • @James_D well, I'm not. I just put jar, exe name and that's all my input in that program. There is no option to choose jdk version – miksz1 Nov 30 '20 at 18:14
  • 1
    @miksz1 Surely that option would be under the JRE tab? – James_D Nov 30 '20 at 18:42
  • 2
    If you run the exe from command prompt, does it give an error in the console? – Dustin Nov 30 '20 at 20:44

0 Answers0