kpederson
Posts: 8
Joined: Thu May 24, 2018 7:16 am

Creating OSx install with bundled JRE

When trying to add a bundled JRE to my project it always tells me "Please specify a valid JRE folder".

I have tried adding the JRE for OSx.

I have tried adding the JDK for OSx.

I have tried adding the JRE from the JDK for OSx.

None of these seem to be working, how can I bundle the JRE with my OSx Advanced Installer project?
kpederson
Posts: 8
Joined: Thu May 24, 2018 7:16 am

Re: Creating OSx install with bundled JRE

Can any of the mods/admins here help me with this? None of the other forum threads I have seen have working solutions. Thanks in advance!
kpederson
Posts: 8
Joined: Thu May 24, 2018 7:16 am

Re: Creating OSx install with bundled JRE

Still looking for some help figuring out why Advanced Installer doesn't recognize the 8u171 version of the JRE for OSx. Anyone?
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Creating OSx install with bundled JRE

Hello and welcome to our forums,

We apologize for the delayed reply.

To add a Mac OS JRE bundle you should use the JRE installed by the JDK package installation on a Mac machine. Have a look on our "Mac OS X App Bundles still have the old format" thread and let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kpederson
Posts: 8
Joined: Thu May 24, 2018 7:16 am

Re: Creating OSx install with bundled JRE

Hey Daniel,

Thanks for the reply.

I have seen that post previously and its instructions are not working. I downloaded the JDK (8u171) on my Macbook and tried pointing AI at the JDK folder and every other folder down to the JRE, but none of them work. AI continues to give the error "Please specify a valid JRE folder".

What exactly is AI looking for to determine that it is a "valid JRE folder"? Is there some special folder structure it needs to find? What dir do I need to point AI at so that it is able to find everything it is looking for?
kpederson
Posts: 8
Joined: Thu May 24, 2018 7:16 am

Re: Creating OSx install with bundled JRE

Tried downloading and installing the JDK again just in case I corrupted it in some way and then tried to bundle the JRE with AI and it is still not working. Can someone please give me detailed instructions on how to properly bundle version 8u171 of the JRE with my AI project since none of the information available on the site is accurate?

Thanks,
Ken
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Creating OSx install with bundled JRE

Hello Ken,

I'm not so sure why this happens. However, can you please double check you followed the next steps:

1. download and install the "jdk-8u171-macosx-x64.dmg" setup on a Mac OS machine
2. browse to "/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk" on your Mac machine and copy the "jdk1.8.0_171.jdk" installation archive on your Windows machine
3. open Advanced Installer on your Windows machine
4. create a setup project (with "For Java" or higher project type) and go to "Builds" page
5. here add a new Mac Build (e.g. "BuildMacOS")
6. go to "Java Products" page and select the "Settings" tree node in the middle pane
7. in the top toolbar menu select the "Java Products" tab; here make sure you select your "BuildMacOS" build
8. in the "Java Settings" right pane click on the [Add JRE] button and browse to the "jdk1.8.0_171.jdk" installation archive copied on your Windows machine
9. save and build your project

Here is a screenshot with the Mac OS JRE bundled for your Mac OS build:
screen.jpg
screen.jpg (122.57 KiB) Viewed 7123 times
Hope this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kpederson
Posts: 8
Joined: Thu May 24, 2018 7:16 am

Re: Creating OSx install with bundled JRE

Thank you very much!

My problem was that I was using the DefaultBuild, assuming that it would work for OSx. I guess the DefaultBuild is configured for windows?

Either way, thank you again for your help!
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Creating OSx install with bundled JRE

You are always welcome Ken.

Yes you are right, the DefaultBuild is configured for Windows.

Thank you for your feedback on this matter. I've forwarded it to our development team and hopefully they will improve our invalid JRE error message to include this use case too.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kpederson
Posts: 8
Joined: Thu May 24, 2018 7:16 am

Re: Creating OSx install with bundled JRE

So I was able to bundle the JRE with your instruction, but now when I try to build the installer I am getting an error saying "Error opening file: ..." followed by the path to libjli.dylib.lnk in the JDK folder I copied over to my windows machine. Any idea what would cause this?
kpederson
Posts: 8
Joined: Thu May 24, 2018 7:16 am

Re: Creating OSx install with bundled JRE

Still having the same issue. For what ever reason AI encounters an error when opening the "libjli.dylib.lnk" file in the JDK folder. Any advice?
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Creating OSx install with bundled JRE

Hello Ken,

I am not sure why this happens. Can you please send us the .aip (project file) to support at advancedinstaller dot com so we can investigate its settings? And also the full build log.

If you cannot share with us your project file, then you can try to isolate the behavior in a buildable sample (.aip + its referenced files) which we can build and test on our side.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Mikhail
Posts: 6
Joined: Wed Apr 18, 2018 12:24 am

Re: Creating OSx install with bundled JRE

Hello Ken.
I need Mac install too. I downloaded to windows computer http://download.oracle.com/otn-pub/java ... x64.tar.gz and unpacked it. Inside path Content/Home/lib.., but AI wants Content/Home/jre/lib, so I created folder jre and moved lib there. Not tried yet on Mac, but AI project is compiling without errors.

I expect more problems with signing, I could not find in AI any support for signing Mac install.

Best regards.
Mikhail.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Creating OSx install with bundled JRE

Hello Mikhail,

I am afraid we do not have support to sign the Mac OS X setup package.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”