Hey Hai, The above process is working fine in windows and the same process i have executed in linux system it worked and then i have transferred that folder to my windows system and runned trhe .exe file then it was shown an error message i.e. this application required java runtime envitonment. could you please help me with this
Could it be that the JRE / JDK needs to fit the system you are planning to run the program on? That the JRE / JDK you inserted into your JRE folder is for linux only, so when you try to run the same build on windows it wont recognize it as a JRE / JDK. Let me know if you find a solution!
this way it will not run in linux, even if you put the linux native library jars on the root of the .jar zip instead of the windows native jar libs. of course it works in windows.
Hey man, you really saved me there. I've been attempting this for a while and kept failing when I prepared the JRE folder in the same path as the config and exe file. For all those who were wondering how to include libraries and modules (like JavaFX and so on), consider creating a "fat JAR file." This is a viable option that bundles your dependencies with it. However, this option is not available within Launch4j. You must ensure this through your IDE when proceeding with the JAR file. Best of luck, my programmer friends. =)
Hi! i created a fat-jar in gradle with this code: jar { manifest { attributes 'Main-Class': application.mainClass } from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } duplicatesStrategy = DuplicatesStrategy.EXCLUDE } and it includes the dependencies that i use. But the problem, is that i want also the JRE to be included in the app, so the final user doesn't need to have the .exe and a JRE, instead of just the .exe file that internally contains the JRE. Is this possible? Thanks!
Really works (event without JavaFX DLL's like in another videos). But faced ё│ў. 28, 2024 9:22:54 ╧╧ com.sun.javafx.application.PlatformImpl startup WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @70b868a4'
Если ошибка об отсутствии JavaFX, то заполнить еще JVM Options: ---module-path "JRE\javafx-sdk-21.0.1\lib" --add-modules javafx.controls,javafx.fxml (где путь заменить на свой путь, где лежит именно javafx(\lib). я его скопировал прямо в JRE папочку, рядом с екзешником которая и на неё ссылаюсь.
Best way i have come across so far, also for the JRE you can add it when adding the main exe under other application files. But be careful to add another folder level before it. For example if your JRE is usually in "C:\Users\A\Desktop\Application\JRE" then make a new folder and put the JRE in it like this "C:\Users\A\Desktop\Application\Newfolder\JRE". After that when you add the file path in inno add it as "C:\Users\A\Desktop\Application\Newfolder" only without the JRE and allow subfolders when prompted. What this means is that you don't have to do anything to the code in the end and that you can have the "Allow user to change the Application folder" option enabled in the beginning.
@@eel546 hello yasmine, i would try a few things to find the problem: 1. Did you add the JRE in a new folder first and then added this folder (not the JRE folder inside it) and enabled subfolders when promted 2. If you did number 1. And it still doesn't work try adding the JRE right away. They might have changed the setup wizard. 3. Check in the program folder you just made after installation in the program files in your windows drive if the JRE is next to your exe. 4. Check that your exe works when the jre is next to it
Hi. It's very good tutorial for beginers. I have one problem. My app working with simple txt file to save data from app. When i run my app from exe file, change data and closing it, after restart i don't have any data. The app simply dont save and load data from file. Do you know possible solution? Thanks for answer. Cheers.