Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-19-2012, 04:07 PM   #1
Registered: Oct 2006
Posts: 185

Rep: Reputation: 15
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(

Last edited by tm2383; 09-19-2012 at 04:10 PM.
Old 09-20-2012, 12:23 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,891

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
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.
Old 09-20-2012, 01:57 AM   #3
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 321

Rep: Reputation: 80
Or just install the x64 version of oracle jdk
Old 09-20-2012, 02:07 PM   #4
Registered: Oct 2006
Posts: 185

Original Poster
Rep: Reputation: 15
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,


Last edited by tm2383; 09-20-2012 at 04:18 PM.
Old 09-20-2012, 04:42 PM   #5
Registered: Oct 2006
Posts: 185

Original Poster
Rep: Reputation: 15
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?




Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CVS in Eclipse IDE gamelord12 Linux - Software 12 03-11-2008 07:59 PM
Can't run Eclipse IDE alfredofernandeza Linux - Software 3 05-09-2007 04:06 PM
Eclipse IDE Artik Debian 3 06-27-2005 11:38 PM
anything better than eclipse ide for c/c++? rgiggs Programming 6 06-12-2004 03:15 PM
c++ IDE like Eclipse true_atlantis Linux - Software 5 02-17-2004 01:44 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration