LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Eclipse IDE not working (http://www.linuxquestions.org/questions/linux-software-2/eclipse-ide-not-working-4175428051/)

tm2383 09-19-2012 04:07 PM

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)


bigrigdriver 09-20-2012 12: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 01:57 AM

Or just install the x64 version of oracle jdk

tm2383 09-20-2012 02:07 PM

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

tm2383 09-20-2012 04:42 PM

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


All times are GMT -5. The time now is 05:52 PM.