Topic: eclipse 3.0 运行自带例子--SWT的例子出错,是不是哪里没设置好?

  Print this page

1.eclipse 3.0 运行自带例子--SWT的例子出错,是不是哪里没设置好? Copy to clipboard
Posted by: xidianliuy
Posted on: 2004-05-27 19:27

eclipse 3.0 运行自带例子--SWT的例子出错

我将swt包加到了java build path 中的library中,然后运行org.eclipse.swt.examples中的应用程序,如HelloWorld1.java
出现如下错误:

java.lang.UnsatisfiedLinkError: no swt-win32-3052 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1403)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:832)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:100)
at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:18)
at org.eclipse.swt.graphics.Device.init(Device.java:564)
at org.eclipse.swt.widgets.Display.init(Display.java:1745)
at org.eclipse.swt.graphics.Device.<init>(Device.java:100)
at org.eclipse.swt.widgets.Display.<init>(Display.java:343)
at org.eclipse.swt.widgets.Display.<init>(Display.java:339)
at org.eclipse.swt.examples.addressbook.AddressBook.main(AddressBook.java:54)
Exception in thread "main"

请问怎么解决?

2.Re:eclipse 3.0 运行自带例子--SWT的例子出错,是不是哪里没设置好? [Re: xidianliuy] Copy to clipboard
Posted by: klaus
Posted on: 2004-05-27 21:34

-Djava.library.path={eclipse_plugin_path}/os/win32

3.Re:eclipse 3.0 运行自带例子--SWT的例子出错,是不是哪里没设置好? [Re: xidianliuy] Copy to clipboard
Posted by: xidianliuy
Posted on: 2004-05-27 22:02

楼上的能不能说得更明白一点,-Djava.library.path在哪里设置?

4.Re:eclipse 3.0 运行自带例子--SWT的例子出错,是不是哪里没设置好? [Re: xidianliuy] Copy to clipboard
Posted by: nothing
Posted on: 2004-05-28 06:02

xidianliuy wrote:
楼上的能不能说得更明白一点,-Djava.library.path在哪里设置?


5.Re:eclipse 3.0 运行自带例子--SWT的例子出错,是不是哪里没设置好? [Re: xidianliuy] Copy to clipboard
Posted by: dgjin
Posted on: 2004-05-28 09:17

你直接把plugins\org.eclipse.swt.win32_3.0.0\os\win32\x86\swt-win32-3052.dll这个文件拷贝到jre的bin目录下就可以了

6.Re:eclipse 3.0 运行自带例子--SWT的例子出错,是不是哪里没设置好? [Re: xidianliuy] Copy to clipboard
Posted by: xidianliuy
Posted on: 2004-05-28 09:25

谢谢了,果然可以了!!!
我把plugins\org.eclipse.swt.win32_3.0.0\os\win32\x86\swt-win32-3052.dll考到工程文件夹下也可以!!


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923