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 208720 - The Apple (eawt) About and Preferences menus don't work when using Oracle JDK for Mac
Summary: The Apple (eawt) About and Preferences menus don't work when using Oracle JDK...
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 7.1.1
Hardware: Macintosh (x86) Mac OS X
: P1 normal with 1 vote (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords: JDK_SPECIFIC
Depends on:
Blocks:
 
Reported: 2012-02-21 20:26 UTC by anthonyp
Modified: 2012-04-05 11:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anthonyp 2012-02-21 20:26:56 UTC
NetBeans uses the com.apple.eawt.* API to register handlers for the About, Preferences, and Quit menu items on the Mac system menu bar. With Apple JDK everything works just fine.

Starting with 7u4 Oracle provides its own implementation of JDK on the Mac. It also provides support for the API. However, NetBeans won't install its handlers when it's run with Oracle JDK. I've tested that by adding a debugging output to a file in /tmp/* (to avoid issues with capturing stderr from NetBeans) in the com.apple.eawt.Application.setPreferencesHandler() method - when running NetBeans on Oracle JDK this method isn't invoked at all. If an app doesn't call this method, the Preferences menu won't be installed.

Since 7u4 is a Developer release, we really want NetBeans to be fully functional with Oracle JDK on the Mac. That's why I'm setting the priority of the issue to P2. Also, I've actually reproduced this with NB 7.0.1, but I believe that the problem may still exist with the current version of NetBeans.

Please note: current promoted build of Oracle JDK for the Mac has a bug 7132692 which prevents eawt from working correctly. This issue is fixed [1], however, the fix is not yet integrated (approval is pending). If you're within Oracle, please contact me via email and I'll provide you with a build. Alternatively, you can take a patch from [1], apply it to a clone of jdk7u-dev repository, and build JDK on the Mac yourself.

[1] http://mail.openjdk.java.net/pipermail/jdk7u-dev/2012-February/001982.html
Comment 1 Marian Mirilovic 2012-02-22 13:30:52 UTC

*** This bug has been marked as a duplicate of bug 208498 ***
Comment 2 Antonin Nebuzelsky 2012-02-22 14:34:10 UTC
Not a dup. This one is filed by the Java eng working on the fix of the other issue.

This one needs evaluation on our side.
Comment 3 Antonin Nebuzelsky 2012-03-06 18:56:37 UTC
Isn't this one fixed already?
Comment 4 Stanislav Aubrecht 2012-03-08 11:56:41 UTC
(In reply to comment #3)
> Isn't this one fixed already?

it is supposed to be fixed in nightly builds as of feb 28th but i don't have any fresh JDK preview to verify it.
Comment 5 Tomas Danek 2012-03-19 12:33:07 UTC
Both About and Preferences work fine now, verified in 
Product Version: NetBeans IDE Dev (Build 201203180400)
Java: 1.7.0_04-ea; Java HotSpot(TM) 64-Bit Server VM 23.0-b17
System: Mac OS X version 10.7.3 running on amd64; UTF-8; en_US (nb)
User directory: /tmp/nbTrunk3
Cache directory: /tmp/nbTrunk3/var/cache
Comment 6 Tomas Danek 2012-03-19 12:34:29 UTC
Marking Verified, adding 71patch2-candidate to make this fix get into 7.1.2
Comment 7 Marian Mirilovic 2012-03-22 12:26:48 UTC
Standa, 
please proceed with integration into release71_fixes branch and follow http://wiki.netbeans.org/NetBeansPatchesProcess . Thanks in advance.
Comment 8 Stanislav Aubrecht 2012-04-05 08:37:33 UTC
(In reply to comment #7)
> Standa, 
> please proceed with integration into release71_fixes branch and follow
> http://wiki.netbeans.org/NetBeansPatchesProcess . Thanks in advance.

The main part of the fix was in the JDK.
My part of the fix is in the release71_fixes branch already. It came with fix for issue #207576
Comment 9 Marian Mirilovic 2012-04-05 11:39:27 UTC
Ok, so removing candidate SW. Thanks Standa.