0

Ive just installed eclipse and when i try to open it it fails.

Would really appreciate it if anyone could help me with whats gone wrong/ how to fix it.

this is the log:

!SESSION 2013-01-17 16:18:49.511 -----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.7.0_11
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_NZ
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2013-01-17 16:18:50.613
!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/calum/.swt/lib/linux/x86_64/libswt-gtk-3740.so
    Can't load library: /home/calum/.swt/lib/linux/x86_64/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.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:>79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 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)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Calum
  • 2,110
  • 2
  • 22
  • 39
  • Did you downloaded correct version of eclipse for your linux OS? – Smit Jan 17 '13 at 03:37
  • pretty sure i did, used the ubuntu software center – Calum Jan 17 '13 at 03:40
  • did you try re-downloading and installing again? – vishal_aim Jan 17 '13 at 03:44
  • @Calum Try this link [Eclipse Download for Linux](http://www.eclipse.org/downloads/?osType=linux). Choose the correct IDE you need. – Smit Jan 17 '13 at 03:45
  • @Calum See this question. It could help resolve your issue. It looks same as yours. [Eclipse cannot load SWT libraries](http://stackoverflow.com/questions/10165693/eclipse-cannot-load-swt-libraries) and [Exception in thread “main” java.lang.UnsatisfiedLinkError: Could not load SWT library](http://stackoverflow.com/questions/2982883/exception-in-thread-main-java-lang-unsatisfiedlinkerror-could-not-load-swt-l) – Smit Jan 17 '13 at 03:51
  • tried doin an install from the command line and got this error: dpkg: warning: there's no installed package matching ttf-mscorefonts-installer:amd64 – Calum Jan 17 '13 at 03:56
  • thanks smit that fixed it. adding the line: ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/ – Calum Jan 17 '13 at 04:03
  • @Calum I am glad to help you out. Better you post it as answer, accept and close it. – Smit Jan 17 '13 at 04:24
  • did you have x86_64 version of java? post output of java -version – Alexander Kudrevatykh Aug 17 '13 at 09:18

2 Answers2

0

Try these steps.

If you are using debian based os, use

sudo apt-get install eclipse-platform

It's maintained. Else download the IDE for linux from here. Install OpenJDK not oracle java 7.

sudo apt-get install openjdk-7-jdk

If you need to use oracle jdk, see this article. It's working for me in Ubuntu 12.10

Sri Harsha Chilakapati
  • 11,744
  • 6
  • 50
  • 91
0

Try this:

ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/

pablo pidal
  • 349
  • 4
  • 4