Bundle Jre with Install4J - install4j

I have downloaded JRE (jre-x64-1.8.0_40.zip) using Maven Dependency.
I want to Bundle this Jre to install4J.
When I am trying to bundle this, during building it is showing error as FileNotFoundException and looking for File jre-x64-1.8.0_40.zip.tar.gz.
How can I bundle jre zip?
If not, does install4j provide feature to convert file type?

You can create install4j JRE bundles from installed JREs by invoking Project->Create a JRE Bundle from the main menu or by using the createbundle command line utility.
It is not possible to directly convert a ZIP with a JRE or an archive downloaded from the Oracle web site into a JRE bundle that is usable by install4j. You have to install the JRE first in any case.
This has changed with install4j 8. For details, see section "JRE bundle format" on https://www.ej-technologies.com/resources/install4j/help/doc/concepts/jreBundles.html.

Related

createbundle command line refuses to generate Mac bundle on Windows

https://stackoverflow.com/a/57802270/6944068 says "You can generate macOS JRE bundle on Windows."
However, my attempt failed, see transcript:
C:\develop\projects\id-gui\target\downloads\jre-bundles>..\install4j8.0.8\bin\createbundle C:\develop\projects\id-gui\target\downloads\jre-bundles\zulu11.41.24-sa-jdk11.0.8-macosx_x64
The JRE bundle wizard can only create JRE bundles for the platform you're currently running on.
The java home directory C:\develop\projects\id-gui\target\downloads\jre-bundles\zulu11.41.24-sa-jdk11.0.8-macosx_x64 contains a JRE for a different platform.
What's wrong?
The cross-platform generation only applies to bundles that are generated via the mechanism configured on the "General Settings->JRE bundles" step. The createbundle command line tool creates "pre-created JRE bundles", in the install4j IDE you would do the same with "Project->Create a JRE bundle". Those bundles can only be generated on the platform that they are intended for because they rely on a working local installation.

Bundle Jre downloaded as maven dependency with Install4J

I am using maven to build my install4J project. I am downloading jre.tar.gz into my project using a Maven dependency. I want to bundle this Jre with Install4J.
I have created a compiler variable bundleJRE which is the path to the jre.tar.gz file, and I created the installer executable.
While installing on a non-java machine, I get an invalid JRE error. Do I need anything else to be configured? How can I bundle this?
We have the same way to build our installer with maven. If the jre is packed correctly ensure the search sequence for the JRE is set to the installation folder first (or only). You can configure that in the "General Settings -> Java Version" configuration tab. We only added the installation folder and deleted all the other entries. Also ensure the minimum java version matches with your bundled one.

Mac installer with install4j not taking jre folder

I am building Mac (10.10.5) Installer with install4j with bundled JRE option in the Media step.
After creating installer when I install my application than the JRE folder is not generate in the application folder. How can I get this?
The location of the JRE bundle on Mac OS X for single bundle media files is in Content/Resources/jre.bundle

How do i prepare a JRE of Java 1.8.0 EA for shipping with my Mac OS X app's installer?

My goal is to bundle a JRE of JDK 1.8.0 ea (build 120 in this case) with my application files, so that the launcher which is generated by install4j will utilize this jre to run the app.
Now, when i'm trying to set the JRE in the media files options, i can't do the same as in the windows version with a windows JRE. In that case, i was just pointing to the directory the JRE resides in. As i see in the installer build log, it's expected to have a jre.tar.gz in the path that i set manually. So i packed the JRE subdir of the JDK into a jre.tar.gz file. Now, the installer is built without warnings or errors. But when i try to start the installer, it shows me an internal error: "launch path is not accessible".
This is strange because i expected an error to maybe come up when i'm launching the App, but not at this point already.
The opposite comes up when i'm using a JRE v1.7 to set as a bundled JRE in the media file. In this case, the installer starts and the program - of course - doesn't.
How do i have to prepare my Java 8 JRE to ship with my app but not cause the installer to crash?
Use
Project->Create a JRE Bundle
in the install4j IDE. It may not work with Java 8 though. We will support Java 8 JRE bundles when it is released.

Fixing Install4j warnings related to external references to JRE bundles

I'm working with an Install4j v4.2.8 project file that initially referenced internal JREs in C:\Program Files\install4j\jre. It now references the same JRE bundles outside of the Install4j installation directory. Since the change was made, we've been seeing message like the following each time a JRE bundle is added to an installer:
[WARNING] The version of the bundled JRE is too low. It should be at least 1.6!
Is there any way to let Install4j know that those JRE bundles do indeed include 1.6 JREs?
The version is inferred from the file name. The format is
[os]-[arch]-[version][suffix].tar.gz
For example
windows-amd64-1.6.0_29.tar.gz