由於ubuntu的default JDK是Open JDK, 但由於要編譯Android 的關係, 我把JDK換成了Oracle JDK, 而導致安裝好Eclipse後 在啟動Eclipse會失敗, 失敗訊息如下
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-gtk-3740 in java.library.path
no swt-gtk in java.library.path
Can't load library: /home/hamersun/.swt/lib/linux/x86_64/libswt-gtk-3740.so
Can't load library: /home/hamersun/.swt/lib/linux/x86_64/libswt-gtk.so
解決方法是
on 64-bit
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-gtk-3740 in java.library.path
no swt-gtk in java.library.path
Can't load library: /home/hamersun/.swt/lib/linux/x86_64/libswt-gtk-3740.so
Can't load library: /home/hamersun/.swt/lib/linux/x86_64/libswt-gtk.so
解決方法是
on 64-bit
ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/on 32-bit
ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86/
沒有留言:
張貼留言