This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 231952 - Cannot bundle JRE with Mac installer
Summary: Cannot bundle JRE with Mac installer
Status: NEW
Alias: None
Product: installer
Classification: Unclassified
Component: NBI (show other bugs)
Version: 8.0.2
Hardware: Macintosh Mac OS X
: P2 normal with 3 votes (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-27 18:37 UTC by SirIntellegence
Modified: 2015-01-29 22:06 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SirIntellegence 2013-06-27 18:37:42 UTC
The 'Package As' -> 'Installers' Action does not allow bundling the jvm with the mac installer.  I know this because I discovered that with the following ant code, the mac installer block does not throw a FileNotFoundException

            <!-- Mac installer -->
            <if property="platform" value="macosx">
                <create-bundle root="${output.dir}/registry-temp" platform="${platform}"
                   target="${bundles.release.dir}/${bundle.files.prefix}-${platform}.${bundle.extention}">
                    <component uid="${main.product.uid}" version="1.0.0.0.0"/>
                    <property name="nbi.bundled.jvm.file" value="Invalid Path"/>
                </create-bundle>
            </if>

But it does when packaging the windows and linux installers with nbi.bundled.jvm.file set to "Invalid Path", it does throw that exception.
Comment 1 Libor Fischmeistr 2013-07-01 09:11:00 UTC
Hello, thanks for the report. Because of this script is not officially supported we will track this issue as enhancement and we are also planning to deal with bundling JRE into installer in the future.
Comment 2 normen 2013-07-21 11:31:55 UTC
Any workarounds for this? The shell script that runs the installer works for Linux so I suppose most of that code can be used on mac too now?

At the moment the NBI installer is completely broken on OSX 10.8+, it will use Apples java to launch and then you cannot use the UI for some reason, it doesn't react to mouse or keyboard input. It also doesn't find installed Oracle JDKs so if Apples Java isn't installed it will fail completely to launch. At least allowing to use a bundled JRE/JDK would help a lot.
Comment 3 netdance 2014-10-09 19:02:28 UTC
Hello Normen,

I would be very interested to have a work around for this issue. It makes Netbeans installer useless for deployment on a OS X. What did you do to bundle the JRE with the NBI?

Thanks!
Comment 4 normen 2015-01-13 15:08:52 UTC
(In reply to netdance from comment #3)
> Hello Normen,
> 
> I would be very interested to have a work around for this issue. It makes
> Netbeans installer useless for deployment on a OS X. What did you do to
> bundle the JRE with the NBI?
> 
> Thanks!

I added a bundle to the installer that contains the JDK and installs itself to the jdk folder in the installation. However, as I mention above, the installer won't run properly when started with Apples java, you need to go into the bundle and run the jar file if you want to use the installer. I ended up providing a zip file with the application for OSX users.
Comment 5 phansson 2015-01-29 22:06:09 UTC
See bug 250103 which is an RFE on this topic but also tells you how you can fix it on your own until it is fixed officially.