RCP on OSX - Carbon, Cocoa, and SWT_AWT troubles... [message #488936] |
Wed, 30 September 2009 14:45  |
Eclipse User |
|
|
|
I have been trying to get an RCP app that uses some Swing elements to work on the Mac platform. I personally don't care if I am using Carbon or Cocoa. I had heard from IRC and other posts that the SWT_AWT bridge isn't fully implemented for Cocoa on OSX, so I am trying to use Carbon instead. I downloaded the Carbon eclipse sdk and I am using the Carbon RCP SDK for my target. However, when I launch this toy test project, I still get errors about Cocoa. What is going on? I just want my RCP (with Swing) app to work in some way on OSX.
Here are the errors:
Hello RCP World!
2009-09-30 13:21:16.096 java[59035:80f] [Java CocoaComponent compatibility mode]: Enabled
2009-09-30 13:21:16.097 java[59035:80f] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
2009-09-30 13:21:16.618 java[59035:1ba03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x143cc0> '(null)') unlocked when not locked
2009-09-30 13:21:16.619 java[59035:1ba03] *** Break on _NSLockError() to debug.
2009-09-30 13:21:16.722 java[59035:1ba03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x1445b0> '(null)') unlocked when not locked
2009-09-30 13:21:16.722 java[59035:1ba03] *** Break on _NSLockError() to debug.
2009-09-30 13:21:16.999 java[59035:1ba03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19eb40> '(null)') unlocked when not locked
2009-09-30 13:21:17.000 java[59035:1ba03] *** Break on _NSLockError() to debug.
2009-09-30 13:21:17.102 java[59035:1ba03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19a460> '(null)') unlocked when not locked
2009-09-30 13:21:17.103 java[59035:1ba03] *** Break on _NSLockError() to debug.
2009-09-30 13:21:17.205 java[59035:1ba03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19ef60> '(null)') unlocked when not locked
2009-09-30 13:21:17.205 java[59035:1ba03] *** Break on _NSLockError() to debug.
2009-09-30 13:21:17.306 java[59035:1ba03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19f1a0> '(null)') unlocked when not locked
2009-09-30 13:21:17.307 java[59035:1ba03] *** Break on _NSLockError() to debug.
2009-09-30 13:21:17.409 java[59035:1ba03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19f490> '(null)') unlocked when not locked
2009-09-30 13:21:17.410 java[59035:1ba03] *** Break on _NSLockError() to debug.
2009-09-30 13:21:17.511 java[59035:1ba03] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x19f540> '(null)') unlocked when not locked
2009-09-30 13:21:17.512 java[59035:1ba03] *** Break on _NSLockError() to debug.
Closing down...
Here is the code for the toy application:
package headlesstest;
import javax.swing.JFrame;
import javax.swing.JLabel;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
/**
* This class controls all aspects of the application's execution
*/
public class Application implements IApplication {
/*
* (non-Javadoc)
*
* @seeorg.eclipse.equinox.app.IApplicationstart(org.eclipse.equinox.app.
* IApplicationContext)
*/
public Object start(IApplicationContext context) throws Exception {
System.out.println("Hello RCP World!");
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
Thread.sleep(10000);
System.out.println("Closing down...");
return IApplication.EXIT_OK;
}
private static void createAndShowGUI() {
// Create and set up the window.
JFrame frame = new JFrame("HelloWorldSwing");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Add the ubiquitous "Hello World" label.
JLabel label = new JLabel("Hello World");
frame.getContentPane().add(label);
// Display the window.
frame.setSize(400, 400);
frame.pack();
frame.setVisible(true);
}
/*
* (non-Javadoc)
*
* @see org.eclipse.equinox.app.IApplicationstop()
*/
public void stop() {
// nothing to do
}
}
This exact same code works just fine on a Linux machine. Please help!
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.25493 seconds