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

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.

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.

MyEclipse doesnt accept JDK for creating Runtime

I am trying to create a JBoss Runtime in Eclipse. I have added 2 JRE entries in my Eclipse - one for JDK1.7 and another for 1.8.
Still Eclipse wont identify my 1.7 entry. See screenshots attached.
P.S: I got my JDK 1.7 by extracting the MSI/Exe setup file using 7 zip. I have done regular installation of Java 1.8 and My Java_Home is set to 1.8 in the PC. I don't want to modify it to point to lower version as it will impact other projects.
Your JRE definition won't be recognized as valid for the JBoss runtime if it is not a JDK. Your extraction of the JDK may have resulted in a JRE instead. Why not just run the JDK installer and change the installation folder to something other than your Program Files folder; it won't switch your system to Java 1.7 that way (I just tried this myself to check). Then define a new JRE to point to the newly installed JDK 1.7 and you'll be able to use that for the JBoss runtime.

How Do I make the Install4j IDE to upgrade to Java7 instead of Java6

I have upgraded to Java7 recently.
I had my install4j Project file in Java6.
Now in the Install4j IDE, I go to Media wizard and download 1.7 JRE's and select them for Windows. (I have window 7 64 bit.)
But When I go the Installer tab in IDE , where for some of the screens I have my custom code which is compiled in Java7.
It gives an error for the IDE java version lower than the compiled version(for those class files).
The Common Location where is the JRE for 1.6 was downloaded C:\Program Files\Common Files\i4j_jres
But the JREs for 1.7 somehow are never downloaded in the common location.
How Do I make the Install4j IDE to upgrade to Java7 instead of Java6.
Thanks
Sony
We had the same problem as you, so we just swapped out install4j's built-in JRE with the one we used to compile our custom code.
i.e. - replace "C:\Program Files\install4j5\jre" with the jre you use to build your custom actions.
Under General Settings->Java version, change the minimum version to 1.7

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.