How to setup a swt source workspace [message #1220459] |
Wed, 11 December 2013 16:34  |
Eclipse User |
|
|
|
Hi,
I've downloaded "swt-4.3-cocoa-macosx-x86_64.zip" on my mac (10.9 mavericks). When I compile one of the SWT examples (e.g. texteditor) and add the swt.jar to the project libraries the program starts without problems.
But, I'd like to compile the SWT from source and run the example. In this case the program crashes with the following error:
Exception in thread "main" org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4397)
at org.eclipse.swt.SWT.error(SWT.java:4312)
at org.eclipse.swt.SWT.error(SWT.java:4283)
at org.eclipse.swt.widgets.Display.error(Display.java:1076)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:833)
at org.eclipse.swt.widgets.Display.create(Display.java:816)
at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
at org.eclipse.swt.widgets.Display.<init>(Display.java:707)
at org.eclipse.swt.widgets.Display.<init>(Display.java:698)
at TextEditor.main(TextEditor.java:101)
The program also crashes even if I simply copy/paste the compiled libs and classes into my workspace.
So, the question is how to setup the swt source workspace.
thanks in advance,
evangelos
|
|
|
|
Re: How to setup a swt source workspace [message #1220694 is a reply to message #1220682] |
Fri, 13 December 2013 02:04  |
Eclipse User |
|
|
|
Thank you Niraj,
My first trial was to clone the SWT repo and build the jar but it failed due to an error in project org.eclipse.swt. My second trial was to build a jar following the instructions I found in the SWT FAQ pages which also failed ("http://www.eclipse.org/swt/faq.php#howbuildjar").
Finally, I deleted and recreated the project changing the name from "swt" to "org.eclipse.swt". Now, Eclipse starts the TextEditor without problems and having edited a little the script "build.sh" I can build everything but the not the native library that depends on the xulrunner sdk. The first problem i faced was that the header files of the installed SDK are in a different location from where the "make_macosx.mak" expects; the file I've downloaded is "xulrunner-25.0.en-US.mac-x86_64.sdk.tar.bz2".
But, let's assume that my original question has been answered; I can compile the necessary SWT classes to run the TextEditor.
regards,
ev. drikos
|
|
|
Powered by
FUDForum. Page generated in 0.03948 seconds