JDK-8075070 : [macosx] system menu bar disabled when using webstart to start
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8u40
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: other
  • CPU: x86
  • Submitted: 2015-03-12
  • Updated: 2015-04-30
  • Resolved: 2015-03-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Mac OS X 10.10.2

EXTRA RELEVANT SYSTEM CONFIGURATION :
Java Web Start 11.40.2.25
Using JRE version 1.8.0_40-b25 Java HotSpot(TM) 64-Bit Server VM

A DESCRIPTION OF THE PROBLEM :
After upgrading Java 8 to update 40, the system menu bar did not show up when starting app using WebStart with System property "apple.laf.useScreenMenuBar" set to true.

The system menu bar did show up, when running the app from command line (e.g. java -jar app.jar). This issue seems to only happen when staring the app using WebStart JNLP.

This maybe related to the fix in JDK-8048549?

REGRESSION.  Last worked in version 8u31

ADDITIONAL REGRESSION INFORMATION: 
Java Web Start 11.31.2.13
Using JRE version 1.8.0_31-b13 Java HotSpot(TM) 64-Bit Server VM

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. setup swing java app with native/system menubar to start with webstart

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The app menubar will be shown in the Mac OS system menubar.
ACTUAL -
The app menubar did not show in the Mac OS system menubar.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
/*
 * sample app with native menubar
 */
import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;

import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;
import javax.swing.border.CompoundBorder;
import javax.swing.border.EmptyBorder;

public class MacMenubarDisappearDemo {
  
  public static void main(final String[] args) {
    System.setProperty("apple.laf.useScreenMenuBar", "true");
    
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        String frameTitle = "JFrame";
        final JFrame frame = new JFrame(frameTitle);
    
        frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        
        final JMenuBar menuBar = new JMenuBar();
        
        final JMenu menu = new JMenu("About");
        menu.add(new JMenuItem("Test"));
        menuBar.add(menu);
        frame.setJMenuBar(menuBar);
        
        final JPanel panel = new JPanel();
        panel.setBorder(new CompoundBorder(panel.getBorder(), new EmptyBorder(10, 10, 10, 10)));
        panel.setLayout(new BorderLayout());

        final JLabel label = new JLabel("This is a frame with native menubar", SwingConstants.CENTER);
        label.setFont(label.getFont().deriveFont(24.0f));
        label.setBorder(new CompoundBorder(new EmptyBorder(10, 10, 10, 10), label.getBorder()));

        panel.add(label, BorderLayout.NORTH);

        frame.add(panel);
        frame.pack();   
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
      }
    });
  }
}

---------- END SOURCE ----------


Comments
is it dup of JDK-8074668 ?
16-03-2015

Check this bug on a build provided in https://bugs.openjdk.java.net/browse/JDK-8074668
12-03-2015