JDK-8078230 : -XstartOnFirstThread needs to be allowed as argument in java-vm-args
  • Type: Enhancement
  • Component: deploy
  • Affected Version: 7u75
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: os_x
  • CPU: x86
  • Submitted: 2015-03-31
  • Updated: 2016-03-02
  • Resolved: 2015-11-05
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 :  
Relates :  
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
To run SWT applications on OSX it is necessary to specify the -XstartOnFirstThread in java-vm-args (see https://www.eclipse.org/swt/macosx/). 

According to the jnlp-syntax (http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/developersguide/syntax.html)  this argument is currently not marked as allowed and therefore the jvm is started without the argument and this results in a crash of the application with

!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTException: Invalid thread access
        at org.eclipse.swt.SWT.error(SWT.java:4361)
        at org.eclipse.swt.SWT.error(SWT.java:4276)
        at org.eclipse.swt.SWT.error(SWT.java:4247)
        at org.eclipse.swt.widgets.Display.error(Display.java:1070)
        at org.eclipse.swt.widgets.Display.createDisplay(Display.java:827)
        at org.eclipse.swt.widgets.Display.create(Display.java:810)
        at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
        at org.eclipse.swt.widgets.Display.<init>(Display.java:701)
        at org.eclipse.swt.widgets.Display.<init>(Display.java:692)
        at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:716)
        at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)

So please mark -XstartOnFirstThread as allowed in java-vm-args (at least on OSX). 

Thanks

JUSTIFICATION :
According to: https://www.eclipse.org/swt/macosx/

The special VM option -XstartOnFirstThread is also required for SWT applications to run properly on the Mac.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
VM-argument -XstartOnFirstThread is passed through to the vm. 
ACTUAL -
-XstartOnFirstThread is fiotert because it is not marked as secure argument... 

CUSTOMER SUBMITTED WORKAROUND :
Don't use a mac...  :-(


Comments
including fix in fix for JDK-7024585
05-11-2015

will try to bundle this request with other requests for additional secure vm args and properties in JDK9
02-09-2015