2013年12月19日 星期四

Eclipse cannot load SWT libraries

After installed eclipse in ubuntu 12.04. you may meet the following problem.

Eclipse cannot load SWT libraries

The log looks like belows.
 11         java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
 12         no swt-gtk-3740 in java.library.path
 13         no swt-gtk in java.library.path
 14         Can't load library: ~/.swt/lib/linux/x86_64/libswt-gtk-3740.so
 15         Can't load library: ~/.swt/lib/linux/x86_64/libswt-gtk.so

The solution is: 
echo "-Djava.library.path=/usr/lib/jni/" >> /etc/eclipse.ini




沒有留言:

張貼留言