Darwin OpenJDK 7 Binaries - Not Working With SWT

Michael Franz mvfranz at gmail.com
Sun Sep 7 13:08:00 PDT 2008


>
> This is because OpenJDK7 does not have a Cocoa-based AWT that must start on
> thread 0 to receive events from the OS. If you simply remove the
> -XstartOnFirstThread argument, or apply a patch to OpenJDK (which I believe
> SoyLatte did) to ignore this "VM flag", everything should start fine.
>

I changed the startup to not pass the flag.  I was running this from inside
eclipse, but eclipse must somehow pass the option as it did not show up in
the command.

I am now getting an unsatisfiedlinkerror.

When I run from the command line using the Apple 1.5 JVM and then using the
OpenJDK.  The Apple version works. The OpenJDK produces:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-cocoa-3448
or swt-cocoa in swt.library.path, java.library.path or the jar file
    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:233)
    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:151)
    at org.eclipse.swt.internal.C.<clinit>(C.java:21)
    at org.eclipse.swt.widgets.Display.createDisplay(Display.java:620)
    at org.eclipse.swt.widgets.Display.create(Display.java:613)
    at org.eclipse.swt.graphics.Device.<init>(Device.java:113)
    at org.eclipse.swt.widgets.Display.<init>(Display.java:536)
    at org.eclipse.swt.widgets.Display.<init>(Display.java:527)
    at
org.eclipse.swt.examples.controlexample.ControlExample.main(ControlExample.java:202)

The command I execute

 /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/bin/java
-Djava.library.path=/Users/mfranz/Documents/eclipse-3.4/workspace/org.eclipse.swt.cocoa.macosx
-Dfile.encoding=MacRoman -classpath
/Users/mfranz/Documents/eclipse-3.4/workspace/org.eclipse.swt.examples/bin:/Users/mfranz/Documents/eclipse-3.4/workspace/org.eclipse.swt/bin:/Users/mfranz/Documents/eclipse-3.4/workspace/org.eclipse.swt/extra_jars/exceptions.jar:/Applications/eclipse-3.4/plugins/org.eclipse.swt.carbon.macosx_3.4.0.v3448f.jar
org.eclipse.swt.examples.controlexample.ControlExample

 /Users/mfranz/developer/openjdk-bsd/openjdk7-darwin-i386-20080820/bin/java
-Djava.library.path=/Users/mfranz/Documents/eclipse-3.4/workspace/org.eclipse.swt.cocoa.macosx
-Dfile.encoding=MacRoman -classpath
/Users/mfranz/Documents/eclipse-3.4/workspace/org.eclipse.swt.examples/bin:/Users/mfranz/Documents/eclipse-3.4/workspace/org.eclipse.swt/bin:/Users/mfranz/Documents/eclipse-3.4/workspace/org.eclipse.swt/extra_jars/exceptions.jar:/Applications/eclipse-3.4/plugins/org.eclipse.swt.carbon.macosx_3.4.0.v3448f.jar
org.eclipse.swt.examples.controlexample.ControlExample

Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/bsd-port-dev/attachments/20080907/7f151006/attachment.html 


More information about the bsd-port-dev mailing list