You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Peter Hull <pe...@gmail.com> on 2026/05/22 21:34:22 UTC

macOS jlink problem

Hi,
I am running NB30 on ARM mac, using the Codelerity installer.
I am getting errors when trying to run jlink, which happens as part of
a Maven goal.

Error: /Applications/Apache
NetBeans.app/Contents/Home/lib/libprefs.dylib has been modified

This is a code-signing thing I believe. I can rule out maven because
just running

/Applications/Apache\ NetBeans.app/Contents/Home/bin/jlink --output
xxx  --add-modules java.base

gives a similar error. Adding the --ignore-modified-runtime flag is a
potential workround, it just reports warnings but carries on. These
files are all 'modified', whatever that means.

Warning: /Applications/Apache NetBeans.app/Contents/Home/bin/java has
been modified
Warning: /Applications/Apache NetBeans.app/Contents/Home/bin/keytool
has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/libnet.dylib has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/libnio.dylib has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/libjsig.dylib has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/server/libjsig.dylib has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/jspawnhelper has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/libsyslookup.dylib has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/libosxsecurity.dylib has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/server/libjvm.dylib has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/libjava.dylib has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/libjimage.dylib has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/libverify.dylib has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/libjli.dylib has been modified
Warning: /Applications/Apache
NetBeans.app/Contents/Home/lib/libzip.dylib has been modified

This doesn't affect Windows and doesn't happen with a standalone JDK
which I got from macOS homebrew. I haven't tried any other installers
and I don't know if previous NB versions were the same, but I have
never seen it before.

Any ideas? Thanks

Peter

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

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




Re: macOS jlink problem

Posted by Peter Hull <pe...@gmail.com>.
On Sat, 23 May 2026 at 11:15, Neil C Smith <ne...@apache.org> wrote:
> The other is to just point people to downloading Temurin's JMods or
> using an external JDK for use with jlink.

 Thanks both.

If anyone else has the same problem, what I did was to change the
Default JDK in Options...Java...Maven from "JDK 26 (Default)" to one
that I installed via homebrew.

There's a slight wrinkle when adding a new JDK via "Manage Java
Platforms...Add Platform..." - if you navigate to
/opt/homebrew/Cellar/openjdk the IDE shows the installed JDK folder
(for example, 26.0.1) with the little yellow badge that indicates that
folder is a JDK, but then it doesn't work if you choose it. I think
this is because all the executable files in bin are symlinks. The
'true' JDK is in
/opt/homebrew/Cellar/openjdk/26.0.1/libexec/openjdk.jdk/Contents/Home.
Probably obvious to all but it took me a while to figure it out.

Peter

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

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




Re: macOS jlink problem

Posted by Neil C Smith <ne...@apache.org>.
On Sat, 23 May 2026 at 10:52, Michael Bien <mb...@gmail.com> wrote:
> > Yes, this looks like fallout from Temurin using JEP493 and NBPackage's deep
> > resigning of the bundled JDK on macOS.
> https://github.com/adoptium/temurin-build/issues/4057#issuecomment-2503352308
>
> i suppose signing on mac would append something to the dylib's metadata which jlink notices when it doesnt match the sha anymore?

Yes, pretty much this, although NBPackage replaces the existing
signature rather than appending.  Which as you say, changes the sha
that jlink is verifying against.  I don't think those can be easily
updated.  AFAIK, Temurin had this issue itself with JEP493 until they
changed where signing was in their build order.

I'm not sure what the answer is here - there are more factors in play
than when this was first written.  It might be to update NBPackage
with an option to keep the JDK's existing signatures, and do a bunch
of testing around runtime permissions and notarization in those cases.
The other is to just point people to downloading Temurin's JMods or
using an external JDK for use with jlink.

Best wishes,

Neil

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

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




Re: macOS jlink problem

Posted by Michael Bien <mb...@gmail.com>.
On 5/23/26 00:09, Neil C Smith wrote:
> On Fri, 22 May 2026, 22:34 Peter Hull, <pe...@gmail.com> wrote:
>
>> I am running NB30 on ARM mac, using the Codelerity installer.
>> ...
>> This doesn't affect Windows and doesn't happen with a standalone JDK
>> which I got from macOS homebrew. I haven't tried any other installers
>> and I don't know if previous NB versions were the same, but I have
>> never seen it before.
>>
>> Any ideas? Thanks
>>
> Yes, this looks like fallout from Temurin using JEP493 and NBPackage's deep
> resigning of the bundled JDK on macOS.
https://github.com/adoptium/temurin-build/issues/4057#issuecomment-2503352308

i suppose signing on mac would append something to the dylib's metadata which jlink notices when it doesnt match the sha anymore?

-mbien

>
> Short answer - run JLink using an alternative JDK than the one running the
> IDE.
>
> Best wishes,
>
> Neil
>


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

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




Re: macOS jlink problem

Posted by Neil C Smith <ne...@apache.org>.
On Fri, 22 May 2026, 22:34 Peter Hull, <pe...@gmail.com> wrote:

> I am running NB30 on ARM mac, using the Codelerity installer.
> ...
> This doesn't affect Windows and doesn't happen with a standalone JDK
> which I got from macOS homebrew. I haven't tried any other installers
> and I don't know if previous NB versions were the same, but I have
> never seen it before.
>
> Any ideas? Thanks
>

Yes, this looks like fallout from Temurin using JEP493 and NBPackage's deep
resigning of the bundled JDK on macOS.

Short answer - run JLink using an alternative JDK than the one running the
IDE.

Best wishes,

Neil