で無SWT-炭素-3346またはSWT-炭素は、私が行くハローワールドSWTアプリケーションを取得しようとしています:SWT + Mavenの+のEclipse =ます。java.lang.UnsatisfiedLinkError:swt.library.path
public static void main(String args[]) throws IOException{
Display display = new Display();
Shell shell = new Shell(display);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
しかし、私は次の例外を得ています。私はorg.eclipse.swt.carbonのmacosx版をeclipse/mavenで使用しています。誰もこれを見たことがありますか?
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-carbon-3346 or swt-carbon in swt.library.path, java.library.path or the jar file
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:219)
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:943)
at org.eclipse.swt.widgets.Display.create(Display.java:937)
at org.eclipse.swt.graphics.Device.<init>(Device.java:119)
at org.eclipse.swt.widgets.Display.<init>(Display.java:749)
at org.eclipse.swt.widgets.Display.<init>(Display.java:740)
at com.wuntee.aat.command.adb.LogCat.main(LogCat.java:30)
私はあなたが言っていることを理解していますが、もし私が物事をできるだけ「きれい」にしたいのであればどうしますか?たとえば、Eclipseからインポートしたswtライブラリの.jnilibファイルを見ることができます。アプリケーションを実行するときに、巨大なjava -D ... -D ... -D ...呼び出しをしたくありません。どうやって間違っているのか正確に知ることができますか? – wuntee
最新のSWTバージョンのダウンロードが終了し、正常に動作しているようです。私が持っていた1つの問題は、ライブラリを私のローカルMavenリポジトリに組み込み、m2eclipse経由でプロジェクトに組み込むときでした。アプリケーションがメインスレッドとして実行されていないというエラーがありましたが、うまく動作しているようです....助けてくれてありがとう。 – wuntee