Never mind. I wasn't specifying the java.library.path vm arg
correctly when starting the bsh.Console. With that specified it
creates the Display just fine.
On Oct 23, 2005, at 1:56 PM, Brad Reynolds wrote:
> Has anyone tried to get SWT running from the Beanshell Console?
> I'm running OS X and can get past the UnsatisfiedLinkExceptions by
> putting the native libraries on the classpath but when it comes to
> instantiating an org.eclipse.swt.widgets.Display() I receive an
> exception in createDisplay(...). The exception is:
>
> // Error: // Uncaught Exception: Object constructor : at Line: 1 :
> in file: <unknown file> : new org .eclipse .swt .widgets .Display ( )
>
> Target exception: java.lang.NoClassDefFoundError
>
> java.lang.NoClassDefFoundError
> at org.eclipse.swt.widgets.Display.createDisplay(Display.java:856)
> at org.eclipse.swt.widgets.Display.create(Display.java:836)
> at org.eclipse.swt.graphics.Device.<init>(Device.java:118)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:676)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:667)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0
> (Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance
> (NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> (DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
> at bsh.Reflect.constructObject(Unknown Source)
> at bsh.BSHAllocationExpression.constructObject(Unknown Source)
> at bsh.BSHAllocationExpression.objectAllocation(Unknown Source)
> at bsh.BSHAllocationExpression.eval(Unknown Source)
> at bsh.BSHPrimaryExpression.eval(Unknown Source)
> at bsh.BSHPrimaryExpression.eval(Unknown Source)
> at bsh.bsh % Interpreter.run(Unknown Source)
> at java.lang.Thread.run(Thread.java:552)
>
> Line 856 references the OS class. It's on the classpath so I'm not
> sure what's going on. The OS class loads the "swt-pi" libraries
> statically which I thought I had gotten past. I tried using the
> debug() command and that just locks up the console on OS X after
> this call. Any help on how to debug this would be greatly
> appreciated.
>
> Thanks,
> Brad
>
|