Community
Participate
Working Groups
Because -XstartOnFirstThread does not work for webstart-applications on osx I've tried to find another solution. The DispatchTest is a small example how to start a swt-application without -XstartOnFirstThead. This seems to work very well (also with rcp applications) but unfortunately the whole application hangs if you try to make the application fullscreen. Has someone an idea how to get also the fullscrenmode to work? afaik th package com.apple.concurrent was removed in java 9 - so you can try this example class only with java versions up to 8 or get the source from this classes from here: https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/macosx/classes/com/apple/concurrent/Dispatch.java <pre> import java.awt.Toolkit; import java.lang.reflect.Method; import java.util.concurrent.Callable; import java.util.concurrent.Executor; import java.util.concurrent.FutureTask; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class DispatchTest { public static void main(String[] args) throws Exception { String osName = System.getProperty("os.name"); // if not a mac return false if (!osName.startsWith("Mac") && !osName.startsWith("Darwin")) { DispatchTest.run(); } else { try { Class<?> _c = Class.forName("com.apple.concurrent.Dispatch"); final Method _get_instance = _c.getMethod("getInstance", null); final Object _instance = _get_instance.invoke(null, null); final Method _get_executor = _instance.getClass().getMethod("getNonBlockingMainQueueExecutor", null); final Executor _executor = (Executor) _get_executor.invoke(_instance, null); Toolkit.getDefaultToolkit(); final FutureTask<Void> _f = new FutureTask<Void>(new Callable<Void>() { /** * {@inheritDoc} */ @Override public Void call() throws Exception { DispatchTest.run(); return null; } }); _executor.execute(_f); _f.get(); } catch (final Throwable _e) { _e.printStackTrace(); } } } private static void run() { try { final Display display = new Display(); final Shell shell = new Shell(display); shell.setText("Hello, world!"); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } catch (Exception _e) { _e.printStackTrace(); } } } </pre>
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
This is still an issue when using webstart.