Unable to run Eclipse with Ubuntu 12.04 LTS

Posted on 2014-03-31
Last Modified: 2014-04-01

I installed Oracle Java JDK 7 succesfully from the Terminal:

sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java7-installer

Then I used Ubuntu Software Center to install Eclipse IDE. When I double-click on Eclipse I get dependency errors.

I would like to compile and run Java programs.

See attached error message and the associated log file.

What do I need to do?

Thank you for your help.

Question by:AttilaB
  • 2
  • 2
  • 2
  • +2

Expert Comment

by:Puspharaj Selvaraj
ID: 39968514
Post the error please
LVL 86

Expert Comment

ID: 39968703
You need to install libswt-gtk of some kind. Possibly libswt-gtk-3-java

Author Comment

ID: 39969217
The error is posted in the file:  1396323039323.log
See original posting on top of this page.

But, just to make it easier, I paste it here:

java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2014-03-31 20:30:41.233
!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/attila/.swt/lib/linux/x86_64/
      Can't load library: /home/attila/.swt/lib/linux/x86_64/

I already have libswt-gtk-3-jni_3.7.2-2_i386.deb installed.

This is a 64-bit AMD laptop. Is this the right package for a 64-bit laptop?

Installed PackageStandard widget toolkit (is installed, see screenshot.
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

LVL 12

Expert Comment

by:Sharon Seth
ID: 39969272
Why don't you set what it is complaining . Elsewhere , I found that this works:
Add this line
in  /etc/eclipse.ini
LVL 86

Expert Comment

ID: 39969520
Yes, if it's installed, that's the correct place. It's currently looking in the wrong place
LVL 62

Accepted Solution

gheist earned 500 total points
ID: 39969931
Eclipse packaged wth ubuntu expects openjdk packages with ubuntu.

Author Closing Comment

ID: 39971022
Yes, this is it. If I install a version of Eclipse INTENDED for Oracle Java, it will just work.

Based on your statement I found this, and the install fully worked, and I could run Eclipse:
LVL 62

Expert Comment

ID: 39971355
You can run eclipse jar file with any JVM, but one in ubuntu package is pre-configured to use system JDK/JRE

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Intel fortran compiler (ifort) 5 58
The better OS Architecture 13 88
Setup GlassFish 4 35
maven not picking latest jar instead picking old jar from .m2 12 45
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question