Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » RCP on OSX - Carbon, Cocoa, and SWT_AWT troubles...(Trying to get an RCP app with Swing elements working on Mac)
RCP on OSX - Carbon, Cocoa, and SWT_AWT troubles... [message #488936] Wed, 30 September 2009 18:45 Go to next message
Ken Keefe is currently offline Ken KeefeFriend
Messages: 38
Registered: September 2009
Member
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!
Re: RCP on OSX - Carbon, Cocoa, and SWT_AWT troubles... [message #489269 is a reply to message #488936] Fri, 02 October 2009 08:00 Go to previous messageGo to next message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 160
Registered: July 2009
Senior Member
I have the same problem with my RCP application and get the same error message with Carbon and Cocoa (32,64 bit).
Furthermore the error message occurs if i resize views which
embedd swing panels with the swt_awt bridge.
Any information about this error (and workaround)
is appreciated!
Re: RCP on OSX - Carbon, Cocoa, and SWT_AWT troubles... [message #489698 is a reply to message #489269] Mon, 05 October 2009 15:27 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=290970 .

"Marcel" <marcel.au@web.de> wrote in message
news:ha4bvt$egj$1@build.eclipse.org...
> I have the same problem with my RCP application and get the same error
message with Carbon and Cocoa (32,64 bit).
> Furthermore the error message occurs if i resize views which
> embedd swing panels with the swt_awt bridge.
> Any information about this error (and workaround)
> is appreciated!
>
Re: RCP on OSX - Carbon, Cocoa, and SWT_AWT troubles... [message #494680 is a reply to message #489698] Mon, 02 November 2009 07:51 Go to previous message
Marcel Austenfeld is currently offline Marcel AustenfeldFriend
Messages: 160
Registered: July 2009
Senior Member
Are there any news for this bug?
Previous Topic:How to connect everything together (binding and syncronisation?)
Next Topic:Binding multiple TreeViewers to single model
Goto Forum:
  


Current Time: Fri Apr 26 11:06:13 GMT 2024

Powered by FUDForum. Page generated in 0.03793 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top