可能重复:
Eclipse 无法加载 SWT 库
我有 ubuntu 12.04,默认 jdk 1.6.0_24 和 eclipse indigo 3.7.2。现在,出于学习原因,我必须使用新的 java jdk 1.7.0_07,所以我更新了 jdk,如下所示:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
并且 java 在 1.7.0_07 正确更新。问题是现在 Eclipse 现在可以工作了。当我启动它时,我收到了这个错误:
An error has occurred. See the log file
/home/kira/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1350235337372.log
所以我不得不再次降级java 1.6.0_24。我也尝试通过从 oracle 下载源代码然后更改 PATH 变量来安装它,但结果是一样的。
为什么日食不再工作了?请帮帮我,我要开始一个项目,我必须使用新的 java。这是日志:
!SESSION 2012-10-14 19:25:10.631 -----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.7.0_07
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=it_IT
Command-line arguments: -os linux -ws gtk -arch x86
!ENTRY org.eclipse.osgi 4 0 2012-10-14 19:25:14.472
!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/kira/.swt/lib/linux/x86/libswt-gtk-3740.so
Can't load library: /home/kira/.swt/lib/linux/x86/libswt-gtk.so
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:132)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:695)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:153)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:95)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) 中的 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)。 core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.eclipse .equinox.launcher.Main.invokeFramework(Main.java:622) 在 org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) 在 org.eclipse.equinox.launcher.Main。运行(Main.java:1410)
谢谢