You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Tim Mullé <tm...@gmail.com> on 2022/01/14 12:53:09 UTC

Can't install NetBeans using MacOS installer without JDK installed

Hi,

I tried to install NetBeans using the MacOS installer to see if that would fix my missing Terminal issue, however, I can’t run the installer because I don’t have a JDK installed normally.

I use SDKMAN to manage my JDK installations since I work with multiple JDK versions for my day job and I don’t install JDKs natively.

The installer said it couldn’t find any JDK8 installations..

Is there a way to get it to work with SDKMAN java installations?

NOTE: I normally just use the ZIP file distribution for my installs of NetBeans.. I’m just trying to see using the MacOS packager fixes my Terminal issue from previous emails.

Note a huge deal, just wondering in case someone else might have the same setup.

Thanks,
- Tim


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: Can't install NetBeans using MacOS installer without JDK installed

Posted by Neil C Smith <ne...@apache.org>.
On Sat, 14 Oct 2023 at 15:43, Philip Durbin <ph...@gmail.com> wrote:
> I just reverted the SDKMAN hack I described earlier (now `/usr/libexec/java_home` no longer works) and then proceeded to install NetBeans 19 (Apache-NetBeans-19.pkg, not the community installer) without any issue. So on my machine at least, it seems the hack is no longer required. Thank you, Neil, for letting us know the installer has been changed (fixed, from my perspective). Much appreciated!

Thanks.  Good to know!

> p.s. I'd say whatever is listed first on the download page should "just work" so if we want to nudge people toward the community installers, I'd suggest moving them up. Or maybe there could be a note indicating that if the official installers don't work, please try the community installers. Personally, I'm happy to use the official installer.

Well, now that the Apache distributed Linux and macOS installers are
also built with NBPackage, the difference is that they don't include a
local JDK runtime inside them.

The JDK inside the Codelerity community installer is resigned and
notarized with the IDE.  Given how Apple is moving I think it's a good
thing to push the self-contained, runtime-included bundle.  So, I
agree with you here, and in fact I would even drop Apache installers
and only ship the binary zip from Apache, but that's just my opinion.
As OpenJDK is not Apache license compatible, we cannot ship anything
that includes a JDK inside via Apache infrastructure.

The term "official" is a curious one here.  Officially we only release
sources*.  The Apache and community macOS installers are both
convenience binaries.  Thay are currently produced from the binary zip
on the same machine and signed by the same person, me, just with
different certificates.

* https://www.apache.org/legal/release-policy.html#compiled-packages

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: Can't install NetBeans using MacOS installer without JDK installed

Posted by Philip Durbin <ph...@gmail.com>.
I just reverted the SDKMAN hack I described earlier (now
`/usr/libexec/java_home` no longer works) and then proceeded to install
NetBeans 19 (Apache-NetBeans-19.pkg, not the community installer) without
any issue. So on my machine at least, it seems the hack is no longer
required. Thank you, Neil, for letting us know the installer has been
changed (fixed, from my perspective). Much appreciated!

Thanks,

Phil

p.s. I'd say whatever is listed first on the download page should "just
work" so if we want to nudge people toward the community installers, I'd
suggest moving them up. Or maybe there could be a note indicating that if
the official installers don't work, please try the community installers.
Personally, I'm happy to use the official installer.

On Wed, Aug 30, 2023 at 5:19 AM Neil C Smith <ne...@apache.org> wrote:

> On Wed, 30 Aug 2023 at 02:11, Philip Durbin <ph...@gmail.com>
> wrote:
> > I had the same problem. I'm using SDKMAN and could not install NetBeans
> 18 on my Mac because the NetBeans installer said "No Java found".
> >
> > I fixed it by following
> https://stackoverflow.com/questions/76523553/how-to-make-usr-libexec-java-home-find-jdk-installed-using-sdkman-on-macos
>
> Thanks!  Note that NetBeans 19 will have a completely different
> installer.  This will rely on the launcher finding a JDK.  It will be
> interesting to see whether that requires the same fix.
>
> Unless there is a particular need to run the IDE on a specific JDK, I
> would recommend using the community installer for macOS that includes
> a local JDK for the IDE to run on.  Then everything is signed together
> in a single bundle.  You can still use SDKMAN JDKs for any projects.
>
> Best wishes,
>
> Neil
>

Re: Can't install NetBeans using MacOS installer without JDK installed

Posted by Neil C Smith <ne...@apache.org>.
On Wed, 30 Aug 2023 at 02:11, Philip Durbin <ph...@gmail.com> wrote:
> I had the same problem. I'm using SDKMAN and could not install NetBeans 18 on my Mac because the NetBeans installer said "No Java found".
>
> I fixed it by following https://stackoverflow.com/questions/76523553/how-to-make-usr-libexec-java-home-find-jdk-installed-using-sdkman-on-macos

Thanks!  Note that NetBeans 19 will have a completely different
installer.  This will rely on the launcher finding a JDK.  It will be
interesting to see whether that requires the same fix.

Unless there is a particular need to run the IDE on a specific JDK, I
would recommend using the community installer for macOS that includes
a local JDK for the IDE to run on.  Then everything is signed together
in a single bundle.  You can still use SDKMAN JDKs for any projects.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: Can't install NetBeans using MacOS installer without JDK installed

Posted by Philip Durbin <ph...@gmail.com>.
Hi Tim and everyone,

I had the same problem. I'm using SDKMAN and could not install NetBeans 18
on my Mac because the NetBeans installer said "No Java found".

I fixed it by following
https://stackoverflow.com/questions/76523553/how-to-make-usr-libexec-java-home-find-jdk-installed-using-sdkman-on-macos

Please see the link for a more full explanation, but in short, the strategy
is to trick `/usr/libexec/java_home` into returning something reasonable
like `/Library/Java/JavaVirtualMachines/sdkman-current/Contents/Home` by
faking it out.

Below are the commands I used. You'll want to change "pdurbin" to your
username.

sudo -i
cd /Library/Java/JavaVirtualMachines
mkdir sdkman-current
cd sdkman-current
mkdir Contents
ln -s /Users/pdurbin/.sdkman/candidates/java/current
/Library/Java/JavaVirtualMachines/sdkman-current/Contents/Home
vim Contents/Info.plist

(Paste the XML below from the Stack Overflow post.)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleIdentifier</key>
    <string>sdkman.current</string>
    <key>CFBundleName</key>
    <string>SDKMAN Current JDK</string>
    <key>JavaVM</key>
    <dict>
        <key>JVMPlatformVersion</key>
        <string>9999</string>
        <key>JVMVendor</key>
        <string>Homebrew</string>
        <key>JVMVersion</key>
        <string>9999</string>
    </dict>
</dict>
</plist>

Once all this was in place, `/usr/libexec/java_home` worked and the next
time I opened "Apache NetBeans 18.pkg", I was able to advance past the "No
Java found" error and install NetBeans.

I hope this helps!

Phil

On Fri, Jan 14, 2022 at 7:53 AM Tim Mullé <tm...@gmail.com> wrote:

> Hi,
>
> I tried to install NetBeans using the MacOS installer to see if that would
> fix my missing Terminal issue, however, I can’t run the installer because I
> don’t have a JDK installed normally.
>
> I use SDKMAN to manage my JDK installations since I work with multiple JDK
> versions for my day job and I don’t install JDKs natively.
>
> The installer said it couldn’t find any JDK8 installations..
>
> Is there a way to get it to work with SDKMAN java installations?
>
> NOTE: I normally just use the ZIP file distribution for my installs of
> NetBeans.. I’m just trying to see using the MacOS packager fixes my
> Terminal issue from previous emails.
>
> Note a huge deal, just wondering in case someone else might have the same
> setup.
>
> Thanks,
> - Tim
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>