The jre can usually be found in your SDK folder. Yes the links online are installers, but once it installs, the JRE is now located on your local disk. Mine is located in
${jdk folder}\jre
The parts that you don't need from the JRE could probably be removed manually if you really wanted (I'm not sure whats available online).
After some attempts i finally get a workaround to bundle the jre in my application:
I package my app as a zip file with the following folders inside:
containerFolder
|- jre
|-bin (in bin there is java.exe)
|-lib
|- cfg (to save the user configuration, but it's not needed)
|- bin (my application with the .exe and the .jar and all the other stuff)
In the xml file of launch4j i configure the jre like this:
The trick here is that the path is not to the java.exe file. The path to the jre is relative to the position of the .exe and it should point to one folder before the java.exe file
The jre folder i'm using is just a copy&paste from the jre folder installed on a windows system.
The same problem like you mate. No worries now. Its all solve with the maximum depth to solve future solution.
Solution how you can bundle your JRE for your jar without the need that the user has to install java or not. Your java application will run.
Copy lib and bin folder from your JRE folder to your project dist folder
open launch4j and enter the following setting.
The trick is you need to give the full path to the including javaw.exe.
I have just done this. Above clearly describe the method for bundling jre.
Here, I just share an experience that I have struggled. If you want to create an installer exe after created wrapper exe by launch4j, pay attention to the file path for launch4j and jre. This is my path I used to solve my issues: