标签:style io ar os sp java for 文件 on
在Ubuntu中安装eclipse
sudo apt-get install eclipse-cdt eclipse
安装完成后,启动程序时出现错误框:
An error has occurred. See the log file
/home/GOOD/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1417143109545.log.
打开文件发现错误信息:
!ENTRY org.eclipse.osgi 4 0 2014-11-27 18:51:50.739
!MESSAGE Application error
!STACK 1
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/GOOD/.swt/lib/linux/x86_64/libswt-gtk-3740.so
Can‘t load library: /home/GOOD/.swt/lib/linux/x86_64/libswt-gtk.so
swt-gtk没找到.
于是就习惯性输入
sudo apt-get install swt-gtk-3740
结果是:
E: Unable to locate package swt-gtk-3740
于是在系统库目录下找,结果发现在/usr/lib/jni/中有好几个libswt开头的库文件.从错误上看,要么这路径加到java.library.path中,要么把文件放到/home/x/.swt/lib/linux/x86_64/目录中.
选择采用后者,但不像拷贝重复文件了,所以就做个符号连接吧.
ln -s /usr/lib/jni/libswt-*3740.so ~/.swt/lib/linux/x86_64/
然后重新运行eclipse,可以正常启动了.
标签:style io ar os sp java for 文件 on
原文地址:http://www.cnblogs.com/Skysee/p/4128093.html