javaeclipsemacoseclipse-pluginswt-awt

Eclipse plugin - SWT_AWT not working on OSX


I'm developing an Eclipse plugin using the SWT_AWT bridge in order to design the gui using Swing.
It works perfectly on Windows but when I try to run it in OSX i get this error:

org.eclipse.swt.SWTError: Not implemented    
java.lang.ClassNotFoundException: apple.awt.CEmbeddedFrame

I found this bug report but I still don't understand how to fix this...
Any idea?

Edit: I'm on Mac OSX 10.7.5, my Java version is 7u21, Eclipse is Juno sr2


Solution

  • Solved by updating Java to 7u40 (maybe it wasn't necessary) and by adding this line of code:

    SWT_AWT.embeddedFrameClass = "sun.lwawt.macosx.CViewEmbeddedFrame";