LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 09-19-2012, 05:07 PM   #1
tm2383
Member
 
Registered: Oct 2006
Posts: 184

Rep: Reputation: 15
Eclipse IDE not working


Hi,
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

Code:
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 http://www.oracle.com/technetwork/ja...d-1591157.html

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/libnpjp2.so ~/.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/libnpjp2.so ~/.mozilla/plugins/

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

Thanks,

Tim

Code:
SESSION 2012-09-19 20:03:34.627 -----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.7.0_07
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
!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/tim/.swt/lib/linux/x86_64/libswt-gtk-3740.so
	Can't load library: /home/tim/.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(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	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)

Last edited by tm2383; 09-19-2012 at 05:10 PM.
 
Old 09-20-2012, 01:23 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,805

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
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, 02:57 AM   #3
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 314

Rep: Reputation: 77
Or just install the x64 version of oracle jdk
 
Old 09-20-2012, 03:07 PM   #4
tm2383
Member
 
Registered: Oct 2006
Posts: 184

Original Poster
Rep: Reputation: 15
Hi,
The instructions I followed gave the example of the 32 bit install:

Code:
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 -
Code:
jre-7u7-linux-x64.tar.gz
from here: http://www.oracle.com/technetwork/ja...s-1836441.html

followed the subsequent steps and linked Java to my profile using the 64 bit example :
s
Code:
ln -s /usr/lib/jvm/jre1.7.0/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
I did find an error with this step, in that it should have read
Code:
ln -s /usr/lib/jvm/jre1.7.0/jre1.7.0_07/lib/amd64/libnpjp2.so ~/.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,

Tim

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

Original Poster
Rep: Reputation: 15
I did a bit of research and I finally got Eclipse working by trying this command:

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

Thanks,

Tim
 
  


Reply


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 08:59 PM
Can't run Eclipse IDE alfredofernandeza Linux - Software 3 05-09-2007 05:06 PM
Eclipse IDE Artik Debian 3 06-28-2005 12:38 AM
anything better than eclipse ide for c/c++? rgiggs Programming 6 06-12-2004 04:15 PM
c++ IDE like Eclipse true_atlantis Linux - Software 5 02-17-2004 02:44 PM


All times are GMT -5. The time now is 08:50 AM.

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