-   Linux - Software (
-   -   Eclipse IDE not working (

tm2383 09-19-2012 05:07 PM

Eclipse IDE not working
When i try to run Eclipse, it fails to start and I get the error message "An error has occurred" which generates the log file I have posted below. I am running it on 64 bit Ubuntu 12.04. This is the first time that I have used Eclipse on this computer, so don't know if the problem is due to Eclipse or changes I made to Java. I have removed OpenJava and installed the latest version of Sun Java, to aid Android app development. I did encounter an initial problem with Eclipse not being able to find Java.I altered the path in the eclipse .ini file to point to Java which I have located in /usr/lib/jvm/jre1.7.0/jre1.7.0_07/.
I followed the steps to install Sun Java shown below


To get started, press Ctrl – Alt T. Remove all other installations of OpenJDK from your system.

sudo apt-get purge openjdk*

After that, go and download Java JRE package from

When prompted, save the download. Please select the 32 or 64 bit .tar.gz version file from the list.

then extract the java packages you downloaded.

tar -xvf ~/Downloads/jre-7u4-linux-i586.tar.gz

Next, create your java 7 folder by running the commands below.

sudo mkdir -p /usr/lib/jvm/jre1.7.0

Then move all the extracted files and folders into the java 7 folder.

sudo mv jre1.7.0_04/* /usr/lib/jvm/jre1.7.0/

Next, run the commands below to install / update java 7

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.7.0/jre1.7.0_04/bin/java 0

Next, create a plugin folder in your home directory by running the commands below.

mkdir ~/.mozilla/plugins

Finally, link the java plugin to your profile.

ln -s /usr/lib/jvm/jre1.7.0/jre1.7.0_04/lib/i386/ ~/.mozilla/plugins/

That’s it.

If your system profile is AMD64, then link java to your profile by running the commands below.

ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/ ~/.mozilla/plugins/

Any help from any of you experts out there would be appreciated.




SESSION 2012-09-19 20:03:34.627 -----------------------------------------------
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2012-09-19 20:03:47.281
!MESSAGE Application error
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/tim/.swt/lib/linux/x86_64/
        Can't load library: /home/tim/.swt/lib/linux/x86_64/

        at org.eclipse.swt.internal.Library.loadLibrary(
        at org.eclipse.swt.internal.Library.loadLibrary(
        at org.eclipse.swt.internal.C.<clinit>(
        at org.eclipse.swt.internal.Converter.wcsToMbcs(
        at org.eclipse.swt.internal.Converter.wcsToMbcs(
        at org.eclipse.swt.widgets.Display.<clinit>(
        at org.eclipse.ui.internal.Workbench.createDisplay(
        at org.eclipse.ui.PlatformUI.createDisplay(
        at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(
        at org.eclipse.equinox.launcher.Main.basicRun(
        at org.eclipse.equinox.launcher.Main.main(

bigrigdriver 09-20-2012 01:23 AM

Let's see if I understand this correctly:
1) you have 64bit Ubuntu installed.
2) you removed 64bit jre.
3) you downloaded and installed a 32bit jre (did you satisfy any 32bit dependencies for the 32bit jre?)
4) you don't say if the Eclipse version you installed is 32bit or 64bit. But, since you chose to install 32bit jre, do I assume correctly that the Eclipse you downloaded is also 32bit?

Wouldn't it be much easier to install the 64bit jre from the Ubuntu repository, then install a 64bit version of Eclipse.

Or, install a 32bit version of Ubuntu so that you can use 32bit jre and 32bit Eclipse.

Celyr 09-20-2012 02:57 AM

Or just install the x64 version of oracle jdk

tm2383 09-20-2012 03:07 PM

The instructions I followed gave the example of the 32 bit install:


tar -xvf ~/Downloads/jre-7u4-linux-i586.tar.gz
but did say that there was a 64bit version. For this step I did download and install the 64 bit version -

from here:

followed the subsequent steps and linked Java to my profile using the 64 bit example :

ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/ ~/.mozilla/plugins/
I did find an error with this step, in that it should have read

ln -s /usr/lib/jvm/jre1.7.0/jre1.7.0_07/lib/amd64/ ~/.mozilla/plugins/
Still, after fixing this, JRE works in my browser, but Eclipse still doesn't work. I'm wondering if I need the JDK with Eclipse?

Sun Java is no longer available in the Ubuntu software centre do to some licensing issue.

I'm by NO means an expert on Linux, so any help is appreciated.

Thanks for the help,


tm2383 09-20-2012 05:42 PM

I did a bit of research and I finally got Eclipse working by trying this command:


ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/
Can anyone tell me what this link accomplishes?



All times are GMT -5. The time now is 10:46 AM.