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
Related
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.
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.
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.
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.
I am using Ubuntu 12.04(LTS). In my project in Eclipse I need to use the com.sun.tools.attach package. However, my JRE system library does not include the tools.jar file which contains the package.
I tried installing different JREs and JDKs for both Java 6 and 7. What I noticed is that some of them have the mentioned jar file in their libs folder but Eclipse still fails to include it in my classpath upon selection of the JRE. Referencing tools.jar directly solves the problem but since this is a shared project I am not allowed to modify the classpath and thus this is not a viable solution for me.
My friend is using a MAC with the same version of Eclipse and the default JRE and does not have this problem. What we found out is that for him tools.jar is part of classes.jar which is not the case in my setup (I don't have classes.jar whatsoever).
What do you think might be the source of this problem?
The issue is that the JDK contains the tools.jar file (neither of the JREs do).
It is easy to solve the problem, you have to specify the default runtime environment to use either for the project or for the whole workspace. Change that to any of the installed JDKs.
The easiest way is probably going to Window --> Preferences --> Java --> Installed JREs, and selecting the JDK instead of the JRE. All the projects use this setting by default.
I had exactly the same problem on Ubuntu 12.10 and in my case managed to solve it by adding a reference to the current Java binaries folder to my PATH variable.
PATH="$PATH:/usr/local/java/current/bin"
Or
PATH="$PATH:$JAVA_HOME/bin"
Just edit either .profile or .bash_profile in your /home/<user> folder and you should be fine. If these files doesn't exist just create one of them.
Note: make sure your are using JDK and not JRE