OS X 10.5.5, Java 1.5.0_16 , Eclipse 3.4., Designer 6.8.0

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

OS X 10.5.5, Java 1.5.0_16 , Eclipse 3.4., Designer 6.8.0

Postby IT2BE » Thu Dec 04, 2008 5:41 am

I have the following setup:

OS X 10.5.5,
Java 1.5.0_16 ,
Eclipse 3.4.,
(Swing) Designer 6.8.0

Before I used Eclipse 3.3 and Designer 6.7

SWT and GWK Designer works perfect.

Swing Designer never worked.

The issue reported is:

Operation failed: com.swtdesigner.properties.PropertyException: java.awt.HeadlessException <component: progress class: ProgressStatusBarItem>.

Part of the log is below.

The issue appeared (this time) with a fresh install (today) of Eclipse and plugins. It does not matter if I create a completely new class or use an existing one (this was an existing one).
One of the replies I received earlier to this issue is that it has to do with settings of the java.awt.headless property. I had to set it to false.
So that is what I did in the Eclipse ini file: '-Djava.awt.headless=false' but that does not help either.

I read about people working with Swing Designer on OS X and I want to do that to.

Until now I use JFormDesigner but I really like the way Swing Designer works much more...

Any suggestions?

---------
org.apache.commons.lang.exception.NestableError: com.swtdesigner.properties.PropertyException: java.awt.HeadlessException
<component: progress class: ProgressStatusBarItem>
at com.swtdesigner.model.swing.properties.custom.DesignTimeHelper.execute(DesignTimeHelper.java:56)
at com.swtdesigner.model.JavaInfo.notifyPropertyChanged(JavaInfo.java:5607)
at com.swtdesigner.model.JavaInfo.notifyPropertyChanged(JavaInfo.java:5588)
at com.swtdesigner.gef.common.property.DesignerEditorPropertyComposite.handleRootNodeSelected(DesignerEditorPropertyComposite.java:673)
at com.swtdesigner.gef.common.property.DesignerEditorPropertyComposite.updatePropertyComposite(DesignerEditorPropertyComposite.java:883)
at com.swtdesigner.gef.DesignerEditor.parseCompilationUnit(DesignerEditor.java:1231)
at com.swtdesigner.gef.DesignerEditor$18.execute(DesignerEditor.java:1126)
at com.swtdesigner.model.swing.properties.custom.DesignTimeHelper.execute(DesignTimeHelper.java:54)
at com.swtdesigner.gef.DesignerEditor.handleActivate(DesignerEditor.java:1120)
at com.swtdesigner.gef.DesignerEditor.handleActivate(DesignerEditor.java:1111)
at com.swtdesigner.editors.MultiPageEditor.showDesignEditor(MultiPageEditor.java:392)
at com.swtdesigner.editors.MultiPageEditor$2.widgetSelected(MultiPageEditor.java:178)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3242)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2017)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:320)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3482)
at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java:3024)
at org.eclipse.swt.widgets.Control.actionProc(Control.java:122)
at org.eclipse.swt.widgets.Display.actionProc(Display.java:362)
at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Native Method)
at org.eclipse.swt.widgets.Widget.kEventControlTrack(Widget.java:1106)
at org.eclipse.swt.widgets.Control.kEventControlTrack(Control.java:2097)
at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:375)
at org.eclipse.swt.widgets.Display.controlProc(Display.java:862)
at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3051)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Caused by: com.swtdesigner.properties.PropertyException: java.awt.HeadlessException
<component: progress class: ProgressStatusBarItem>
at com.swtdesigner.model.swing.component.ComponentBeanInfo.prepareControl(ComponentBeanInfo.java:698)
at com.swtdesigner.model.swing.component.ComponentBeanInfo.createGUIComponent(ComponentBeanInfo.java:602)
at com.swtdesigner.model.JavaInfo$18.execute(JavaInfo.java:5612)
at com.swtdesigner.model.swing.properties.custom.DesignTimeHelper.execute(DesignTimeHelper.java:54)
... 56 more
Caused by: java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.<init>(Window.java:318)
at java.awt.Frame.<init>(Frame.java:419)
at java.awt.Frame.<init>(Frame.java:384)
at javax.swing.JFrame.<init>(JFrame.java:150)
at com.swtdesigner.model.swing.component.ComponentBeanInfo.prepareControl(ComponentBeanInfo.java:678)
... 59 more
IT2BE
 
Posts: 2
Joined: Wed Mar 12, 2008 9:33 am

Re: OS X 10.5.5, Java 1.5.0_16 , Eclipse 3.4., Designer 6.8.0

Postby Alexander.Mitin » Thu Dec 04, 2008 6:51 am

This is weird, since the (according to sources) 'headless' variable value determined using 'os.name' and 'java.awt.headless' properties. Default value is false.

Code: Select all
                    String nm = System.getProperty("java.awt.headless");
                   
                    if (nm == null) {
                        /* No need to ask for DISPLAY when run in a browser */
                        if (System.getProperty("javaplugin.version") != null) {
                            headless = defaultHeadless = Boolean.FALSE;
                        } else {
                            String osName = System.getProperty("os.name");                       
                            headless = defaultHeadless =
                                Boolean.valueOf(("Linux".equals(osName) || "SunOS".equals(osName)) &&
                                                (System.getenv("DISPLAY") == null));
                        }
Alexander Mitin
Alexander.Mitin
Moderator
 
Posts: 155
Joined: Fri Jan 19, 2007 3:57 am

Re: OS X 10.5.5, Java 1.5.0_16 , Eclipse 3.4., Designer 6.8.0

Postby moondoggie » Sat Jun 06, 2009 8:35 am

So any more help other than letting us know this is "weird"?
moondoggie
 
Posts: 1
Joined: Sat Jun 06, 2009 8:26 am

Re: OS X 10.5.5, Java 1.5.0_16 , Eclipse 3.4., Designer 6.8.0

Postby Eric Clayberg » Sat Jun 06, 2009 12:02 pm

This is pretty simple. The following exception indicates that the headless flag is set in the Eclipse startup (probably in the eclipse.ini file)...

Code: Select all
java.awt.HeadlessException
    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
    at java.awt.Window.<init>(Window.java:318)
    at java.awt.Frame.<init>(Frame.java:419)
    at java.awt.Frame.<init>(Frame.java:384)
    at javax.swing.JFrame.<init>(JFrame.java:150)

There was a time a couple of years ago that any Swing references in a plugin would cause Eclipse on the Mac to lock up. Adding the headless option was the work around. That problem was solved by the time Eclipse 3.3 was released, if I recall.

Obviously, Swing Designer (or any other Swing related plugin) will not run with that in effect.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to Swing Designer

Who is online

Users browsing this forum: Google [Bot] and 1 guest