Is it mandatory jre/jdk required to install installer created from install4j? if yes then is it possible to reduce size upto 10mb - install4j

Is it mandatory jre/jdk required to install installer created from install4j? if yes then it is possible to reduce jre size less than 10mb?
Actually, I want to use install4j for the installer and packager for my product but product is in golang so that will not require JRE but only for install4j I need to bundle JRE so it's adding about 45-50mb size to my package. is it reducible up to 10mb(total size of only jre <= 10mb) so I can go ahead with install4j?

It is not mandatory to bundle a JRE, install4j can detect installed JREs. However, it is recommended to bundle a JRE to ensure that the installer and the launchers will work.
The smallest JRE bundles can be obtained with a Java 11 JRE, setting the module set to "Minimum" on the "General Settings->JRE bundles step".

Related

Does install4j need a jre on the clients system?

I don't want to be dependent on that java is installed on the system or not
Our product already ships internally with a vm so the user doesn't have to install any java or need to have any java installed.
But this i also want for my installer of our product, there should be no need to have java there on the system to install the product, is this possible with Launch4J?
Because it is always tricky when reading the docs, you can bundle a jre, but what does that mean? Does the installer use that itself?
Yes, a JRE is necessary to run the installer, but you can bundle a JRE with install4j, so no "global installation" of a JRE is requried.

Bundle Jre with 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.

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.

How do I bundle a Solaris JRE with install4j without running the install4j application on Solaris?

The JRE download wizard in install4j only offers Linux and Windows JREs. I need to build a media file that bundles a Solaris JRE. install4j supports building custom JRE bundles but it's JRE Bundle wizard states:
"Please note that the JRE Bundle wizard can only create JRE bundles
for the platform you're running on."
This seems like a serious omission as compared to the other multi-platform install buliders (i.e. InstallAnywhere and InstallBuilder) both of which provide bundled Solaris JREs.
Can I not just unzip/tar a Solaris JRE on my Linux build box and bundle it? Or is there a limitation of the mechanism used to bundle it?
Even though we support Solaris, Solaris boxes are in limited supply.
Can I not just unzip/tar a Solaris JRE on my Linux build box and bundle it?
You would have to create the tar.gz file for the bundle manually as explained here (at the bottom of the page).
However, I would rather suggest adding a requirement that Java is installed on the Solaris box. Bundling a JRE on Solaris is somewhat risky since particular JRE versions require certain OS patches.

How to specify which JRE to use in Netbeans?

I have two JRE in my system. One is 32-bit and the other one 64-bit. In Eclipse I can configure both and choose which one to use when running my application.
I'm wondering if I can do the same thing in Netbeans. I've tried to go to Project Properties, Libraries and then tried to configure a new JRE there, through Manage Platforms, but it doesn't accept the directory of my JRE. How should I proceed?
Be aware that I'm talking about JRE, and not JDK ;)
EDIT: I managed to make it work by downloading a new 32-bit JDK and selecting its directory. I still couldn't make it accept a JRE directory.
Whether or not you can run Netbeans with just the JRE depends on what bundle you have downloaded. In Netbeans 7 only C/C++ and PHP bundles can be run with the JRE.
Older versions of Netbeans include more languages under this JRE umbrella, but the principle is the same.
The JDK contains the JRE plus tools to debug and compile code, so if you're doing anything Java based apart from just running the IDE, netbeans depends on the JDK.