install4j error on Mac OS X - install4j

I am using install4j to create a Window and Mac OSX installer for a new version of my software. The only thing that has changed since my last distribution is my application. I have not changed any of the launcher or media file options in install4j. After building the installer, the Windows installer runs fine. The Mac OSX installer gives an error message on some machines. The message is "You need at least a 1.7 Java Virtual Machine to install..." However, a user reported that they already have 1.7 installed but still gets the error message. Does anyone know what is causing this error? Does install4j require 1.7 to run on a Mac?
Thanks

Edit the media file of your Mac OS X installer and go to the "JRE" step. If "Installed OpenJDK JRE" is selected, then Java 7 and higher is required. The above message indicates that no such JRE was installed. Also, make sure to update to the latest version of install4j.

Related

Eclipse cant be opened on mac m1

I have installed eclipse aarch64 based on my mac m1.
it was working fine. later i stopped using it for few days but i was just opening and closing it just to make sure it is not crashing as it used to happen with x64 version.
Now even with aarch it is crashing.
As soon as i open it via launch pad it says 'The apllication 'Eclipse'can't be opened.
Here are the details of eclipse and jdk version that i am currently using.
Eclipse: eclipse-java-2021-12-R-macosx-cocoa-aarch64
Jdk: jdk-17_macos-aarch64_bin
I've just had the same problem on the second launch of Eclipse from a fresh installation. The solution was to re-sign the app with an ad-hoc signature:
sudo codesign --force --deep --sign - /Applications/Eclipse.app

How to create JRE bundle using Amazon Corretto in Install4j on a Windows platform

I am trialling install4j and am creating an EXE and DMG files for an application with JRE bundled.
We choose to use Amazon Correto 8 so its JRE needs to be bundled.
Here is the link of Amazon Correto 8:
https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/downloads-list.html
I installed install4j on a Windows machine and try to create the bundled JRE for EXE and DMG
There is no problem when creating windows version using https://d3pxv6yz143wms.cloudfront.net/8.212.04.2/amazon-corretto-8.212.04.2-windows-x64-jdk.zip
However, When I tried to create it for DMG file using https://d3pxv6yz143wms.cloudfront.net/8.212.04.2/amazon-corretto-8.212.04.2-macosx-x64.tar.gz, I encounter the following error.
error on windows
I also tried to generate it on a Mac but still failed with a different error.error on mac
Is there a way I can create the bundled JRE for DMG using Amazon Correto Mac version?
You can only create the macOS bundle on a Mac.
The Amazon Corretto JDK on macOS seems to be missing the release file. Try copying it from the Windows distribution to the Contents/Home folder, then it should continue.

Install4j Invalid Thread Access with SWT

When creating an installer for an SWT application for MacOSX, using a 64bit JRE, we are getting an
org.eclipse.swt.SWTException:
Invalid thread access that we can trace to a line:
Display display = new Display().
The error occurs when the application is launched after installation.
The same program works fine in development and in any Windows installations created with Install4j. Is there something different that needs to be done with a Mac OSX installer, aside from our making sure to include the proper SWT jar for the target platform?
Indeed, this seems to be localized to launching on MacOSX after installing with Install4j.
Edit your launcher in install4j, go to the "Executable info" step and select the "Uses SWT or QT" check box. Then it should work.
Update: For Apple JREs, the above is sufficient, but for Oracle JREs, the VM parameter -XstartOnFirstThread has to be added. From install4j 5.1.9 on, this will be added automatically.

Install4j 5.1.6 freeze on Mac 10.8

I upgraded an installer previously created with install4j 4.2.8 (it was for MacOS 10.6) by the following steps:
Open the installer in install4j 5.1.6 and save it;
Change minimum java to 1.7, and set media jre to "Installed OpenJDK JRE"
Check Installer->Startup->Request priviledges->Mac OS X->Try to obtain root privileges if admin user
Then I built the installer, along with a debug version produced.
When I ran the produced dmg on Mac10.8 (with Oracle jre 7 installed), it became frozen when I clicked "Next" on the Installation Screen, and the log file stopped at output "checking writable with maximum". I could see two install4j related processes running at this point. The only way to get out the condition is to kill those processes.
I ensured that the debug version installer worked.
Please help if anyone experienced similar problems. Thanks.

How to build native app bundles for Windows, Linux & Mac in a single build?

I am running my build on Windows 8 O.S. , 64 bit machine. I have JavaFx2.0 and Java 1.7.0_09 installed on my system. I am able to build a 64 bit window executable that launches my JavaFx application as a self-contained Javafx application.
Now I want to deliver native app bundles on Windows, Linux and Mac without build my project on all three platforms i.e I would like to achieve these set of bundles in a single build that I suppose to run on by Windows 8 O.S. 64 bit machine.
I am also okay if I can do it by distributing a single Application JAR file as .zip for MAC and Linux. But what I want is that JAR should work on there respective platform.
When I used to run a single application Jar on MAC using command
java -jar application.jar
It always shows a dialog "The application require a newer version of Java Run-time" with download link. Even I have downloaded and successfully installed it on my MAC machine but it still shows me the same window.
I don't want the users to experience such difficulties while running my JavaFX application on MAC and Linux.
What I need to ship more with the Application JAR so the users can run my JavaFx application on MAC and Linux without any hassle?
I guess you are making the JavaFX Solution in a 64bit machine and on the other hand you must be having all the SDK and runtime for 64bit version. The problem is that the application made using 64bit version of SKD would required 64 bit OS to render itself. So the bottom line is, is yout mac and linux PC have 64bit version of OS and JavaFX Runtime as well as Java7.X all 64 bit? If not then you must update your runtime to 64bit version or make your application in a 32bit version of SDK. One quick suggestion. If your mac or linux is 64bit(I dont have much idea about mac) then just install a browser i.e. 64bit version and runtimes and try out. I was having the same problem and that got fixed. Let me know if my answer caused any confusion.