http://askubuntu.com/questions/26632/how-to-install-eclipse

How to install Eclipse?

I want to install the latest version of Eclipse but the Ubuntu Software Centre contains an older version.

Is there a PPA or some other way to install latest Eclipse? Please describe the steps for full installation.

asked Feb 16 '11 at 11:54
Gaurav Butola
2,67163056
 
    
Have you tried installing it fro USC? –  Mitch♦ May 31 '12 at 10:35
    
USC? what you mean by that ? I'm new to Ubuntu –  Ant's May 31 '12 at 10:38
1  
'Ubuntu Software Center', as shown below. I have installed Eclipse on a couple different computers using the software center method as shown - and then PyDev from inside Eclipse. Works slick. –  memilanuk May 31 '12 at 16:29 

12 Answers

up vote155down voteaccepted

If you've downloaded Eclipse from their official website, follow these steps for the installation.

  1. Extract the eclipse.XX.YY.tar.gz using

    tar -zxvf eclipse.XX.YY.tar.gz
  2. Become root and Copy the extracted folder to /opt

    sudo mv eclipse.XX.YY /opt
  3. Create a desktop file and install it:

    gedit eclipse.desktop

    and copy the following to the eclipse.desktop file.

    [Desktop Entry]
    Name=Eclipse
    Type=Application
    Exec=env UBUNTU_MENUPROXY=0 eclipse44
    Terminal=false
    Icon=eclipse
    Comment=Integrated Development Environment
    NoDisplay=false
    Categories=Development;IDE;
    Name[en]=Eclipse

    then execute the following command to automatically install it in the unity:

    sudo desktop-file-install eclipse.desktop
  4. Create a symlink in /usr/local/bin using

    sudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse44
  5. For eclipse icon to be displayed in dash, eclipse icon can be added as

    sudo cp /opt/eclipse/icon.xpm /usr/share/pixmaps/eclipse.xpm
  6. Give eclipse the required permissions to modify the osgi file.

    sudo chown -R $USER:$USER /opt/eclipse/configuration/org.eclipse.osgi
  7. Don't forget that you need to have either OpenJDK or Sun Java installed to be able to run eclipse. Check this question for more information about Java installation. Here is a simple example of installing Open JDK 1.6:

    sudo apt-get install openjdk-6-jdk

That's it.

 
6  
I recommend that way, with a minor change: Use the eclipse version when creating a the symlink (eg: ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse42), and use Exec=eclipse42 at the desktop entry. That way you will be able to install multiple different versions of eclipse. –  ortang May 27 '13 at 11:36
4  
Don't forget that you need to have either OpenJDK or Sun Java installed to be able to run eclipse. Run sudo apt-get install openjdk-6-jdk or check out this link for Sun Java ubuntugeek.com/… –  Andy Braham Oct 5 '13 at 20:06 
6  
Also worth noting that for 13.10, eclipse.desktop needs Exec=env UBUNTU_MENUPROXY=0 eclipse in order for the menus to work per stackoverflow.com/questions/19452390 –  TimD Nov 25 '13 at 16:46
4  
For steps 2 and 3, I think sudo mv eclipse /opt is more clear and easier for beginners –  Lucas Feb 12 '14 at 10:18
8  
Works for me except /opt/eclipse/configuration/org.eclipse.osgi does not exist... –  Gerhard Burger Jul 27 '14 at 9:52

12.04 LTS

The preferred method:
Open Software Center -

In Ubuntu software center select Eclipse
I installed the Extensible Tool Paltform and Java IDE as well, but installing that is optional.

Enter your password in the authentication dialog.
This will get you 3.7.1 inside of a package management system.

Alternative options:

The next most preferred method
PPA:
As of this moment, the eclipse-team PPA has no eclipse package for 12.04.
I'll update the answer as things develop.

When it becomes available, if you already installed via software center-
sudo add-apt-repository ppa:eclipse-team/ppa && sudo apt-get update && sudo apt-get upgrade

The least preferred method
Portable:
For a portable installation you can still download directly from the Eclipse website. This gives you the ability to customize several Eclipse installations for different languages CDT, Java, and PyDev or Aptana for instance. It doesn't allow automatic updates. Installing through Software Center is always the preferred method.

I tested the portable 3.7.1 and 3.7.2 tarballs and they work just fine on 12.04 LTS.

An added disadvantage to portable installs is that you have to update your launcher if you move the folder or launch it directly.

answered Apr 3 '12 at 0:14
hbdgaf
16.3k23576
 
    
I followed the "preferred method", but curious as to why this is more preferable than the others? – Inquisitor May 25 '13 at 5:53
    
Search the site for questions about java apps not showing up in the app switcher and other things(reproducible problems for example). I don't have these issues when I install from repo, but people complain about them consistently when a repo install would have avoided the problem instead of requiring a cheese tray. –  hbdgaf May 25 '13 at 5:56
    
Well the preferred method definitely installed cleanly for me. Thanks otherwise I would have chosen the messier method –  Inquisitor May 25 '13 at 11:31
2  
This method is definitely easier, although I would combine it with the accepted answer's method for the launcher/desktop shortcut. –  ashes999 Jun 16 '14 at 16:18
2  
@Seanny123 The PPA hasn't been updated since before 12.04. This answer has been around for a while. – hbdgaf Oct 25 '14 at 7:06

How to install Eclipse 4.2 on Ubuntu 12.04

Since the Eclipse packages in the Ubuntu repositories are out of date, if we want to install latest releases, we are going to have to do it manually. You can just download the tar.gz file from eclipse.org.

  1. Download Eclipse. I got eclipse-jee-juno-SR1-linux-gtk.tar.gz

  2. Extract it by executing a command line

    tar -xzf eclipse-jee-juno-SR1-linux-gtk.tar.gz

    Or with Archive Manager extraction.

  3. Move extracted eclipse folder to /opt/ folder

    mv eclipse /opt/
    sudo chown -R root:root /opt/eclipse
    sudo chmod -R +r /opt/eclipse
  4. Create an eclipse executable in your user path

    sudo touch /usr/bin/eclipse
    sudo chmod 755 /usr/bin/eclipse

    Create a file named eclipse in /usr/bin/ with your preferred editor (nanogeditvi...)

    Copy this into it

    #!/bin/sh
    export ECLIPSE_HOME="/opt/eclipse"
    $ECLIPSE_HOME/eclipse $*

    And save the file

  5. Create a Gnome menu item

    Create a file named eclipse.desktop in /usr/share/applications/ with your preferred editor (nanogeditvi...)

    Copy this into it

    [Desktop Entry]
    Encoding=UTF-8
    Name=Eclipse
    Comment=Eclipse IDE
    Exec=eclipse
    Icon=/opt/eclipse/icon.xpm
    Terminal=false
    Type=Application
    Categories=GNOME;Application;Development;
    StartupNotify=true

    And save the file

  6. Launch Eclipse

    /opt/eclipse/eclipse -clean &

  7. Now you can Lock Eclipse to the launcher bar by clicking right button on Lock to Laucher

answered Nov 20 '12 at 22:12
Joe
498816
 
3  
Good instructions, but I think you shouldn't chown and chmod the /opt/eclipse folder. I wasn't able to install plugins after doing that. –  TomTasche Apr 30 '13 at 9:05
    
Like in point 3 but with the normal user? –  Joe May 4 '13 at 20:30
3  
Simply don't do anything except mv eclipse /opt/ in step 3. –  TomTasche May 5 '13 at 16:39
1  
The last line of the script file should be $ECLIPSE_HOME/eclipse "$@" not $ECLIPSE_HOME/eclipse $*. This will preserve things like arguments with spaces in them. –  jbo5112 Dec 13 '13 at 21:20
    
You should probably use /usr/local/bin instead of /usr/bin –  kzh Jun 4 '14 at 16:08

I recommend you to download directly from the eclipse website. the installation process very easy, just extract the files tar.gz, to remove it is also quite easy, simply by deleting the eclipse folder :D

answered Feb 16 '11 at 12:12
 

From your desktop, Click on the Ubuntu Software Center 

Once it opens do a search for Eclipse

When the search is done, you will see Eclipse listed. all you have to do is click on install, sit back and relax until the installation is done.

If you still have any questions, do not hesitate to ask.

answered May 31 '12 at 10:46
Mitch
45.9k982133
 
1  
How do we install eclipse version 4.2 (SR2) with Ubuntu Software Center? It appears version 3.8 –  Joe May 4 '13 at 20:26

This is the instructions copied from http://www.inforbiro.com/blog-eng/ubuntu-12-04-eclipse-installation/

How to install Eclipse IDE platform on Ubuntu 12.04 LTS Precise Pangolin

1) Open a terminal and enter the command

sudo apt-get install eclipse-platform

2) After Eclipse is installed you can install development plugins based on your needs, e.g.:

will install Java Development Tools (JDT) package for Eclipse

sudo apt-get install eclipse-jdt

will install C/C++ development tools packages for Eclipse

sudo apt-get install eclipse-cdt
answered May 31 '12 at 10:48
 

Always download the packaged eclipse from their website. Its best for you to place the eclipse.tar.gz into your opt directory and create symbolic to it and use that around your system.

So if you end up upgrading in the future, all your shortcuts and links wont die.

This is the preferred setup for eclipse. IMO

answered Feb 16 '11 at 14:22
myusuf3
6,261196289
 

I created this little script to install on a bunch of Cinnamon machines. You might have to change specific stuff for your needs but you can use this as a template for your own.

#!/usr/bin/env bash

wget -P /tmp/ http://eclipse.mirror.triple-it.nl/technology/epp/downloads/release/kepler/SR1/eclipse-standard-kepler-SR1-linux-gtk-x86_64.tar.gz

tar -xzf /tmp/eclipse-standard-kepler-SR1-linux-gtk-x86_64.tar.gz -C /opt/
chown -R root: /opt/eclipse/ cat <<- 'EOF' > /usr/bin/eclipse42
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse "$@"
EOF chmod +x /usr/bin/eclipse42 cat <<- EOF > /usr/share/applications/eclipse42.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse42
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;IDE;
StartupNotify=true
EOF

You can now run Kepler by typing eclipse42 or wait for the menu to refresh (or enter restart) to find it there.

Feel free to comment changes you'd recommend.

answered Jan 19 '14 at 22:29
Redsandro
7731920
 

If you are asking about the eclipse classic the latest version from the eclipse project is 3.7.2: and you you can download the tar ball from the website for your OS here:

http://www.eclipse.org/downloads/packages/eclipse-classic-372/indigosr2

The latest version in the Ubuntu Software Center is Eclipse 3.7.1; either download it from there or use the terminal with this command line:

" sudo apt-get install eclipse && sudo apt-get update "

As far as a PPA? There appears to be no current or maintained PPA for eclipse classic. The PPA page at LaunchPad still exists but there has not been any activity for what appears to be two years now. You can check out the PPA page here:

https://launchpad.net/~eclipse-team/+archive/ppa

The best way to install eclipse classic and the latest version 3.7.2 is from the Eclipse Classic project download page for your OS version. Warning: Eclipse 3.7.2 is built and developed for Ubuntu 10.04 LTS according to the Eclipse Project "Read Me" html documentation. There have been known "will not start issues" with later Ubuntu versions due to the compatibility of Java Runtime Enviroments; it works with JRE6 rather than JRE7. Good Luck :)

answered Mar 31 '12 at 5:39
 

As with any other Eclipse version, you don't have to get it from the repositories. Just download the appropriate archive from eclipse.org, extract and run Eclipse.

Eclipse in the repositories is often outdated. It is usually updated every ubuntu release.

answered Jul 27 '12 at 12:02
nickguletskii
2,35911025
 
mkdir ~/opt

Change directory to the folder where your browser downloaded the Eclipse package to. Then unpack Eclipse into the opt folder:

cd {directory where your browser downloaded the package to}
tar -zxvf eclipse-jee-juno-SR1-linux-gtk.tar.gz && mv eclipse ~/opt

Make a bin folder in your home directory, this will be used for the startup script:

mkdir ~/bin

Next create an executable for Eclipe at ~/bin/eclipse with your favorite text editor by typing vi ~/bin/eclipse or nano ~/bin/eclipse into the command line. Add the following content:

export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="$HOME/opt/eclipse"
$ECLIPSE_HOME/eclipse $*

Finally, allow the script to be executed:

chmod +x ~/bin/eclipse

HINT: If you are a gtk user and experience problems with the mouse buttons you should try add an export:

export GDK_NATIVE_WINDOWS=true

to the starter file.

You can now execute that file to start up Eclipse.

answered Dec 3 '12 at 11:50
 

If you have already installed eclipse from the software center, there is an easier way.
If you haven't, do that first.

cd ~/Downloads  # (or wherever your tar.gz is)
sudo tar -xf eclipse.*.tar.gz '/opt'
sudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse

Note: much of this process is just tweaked from the top answer to be easier.

answered Feb 4 '14 at 0:39

How to install Eclipse?的更多相关文章

  1. (转) How to install eclipse in ubuntu 12.04

    源地址:http://www.krizna.com/ubuntu/install-eclipse-in-ubuntu-12-04/ Eclipse installation in ubuntu 12. ...

  2. How to Install Eclipse C/C++ Development Tool--转

    http://www3.ntu.edu.sg/home/ehchua/programming/howto/EclipseCpp_HowTo.html Eclipse 4.3 (Kepler) for ...

  3. Install eclipse ns3 in ubuntu 14.04

    1. NS3 install 参考NS3 tutorial即可. 2.eclipse 2.1下载 下载地址:http://www.eclipse.org/downloads/              ...

  4. Install eclipse groovy plugin

    http://dist.springsource.org/release/GRECLIPSE/e4.4/

  5. How to install Eclipse in linux

    http://askubuntu.com/questions/26632/how-to-install-eclipse

  6. How to install java and eclipse on linux

    First of all, download from the website of java. I download 'jdk-8u102-linux-i586.tar.gz' unzip it t ...

  7. 【335】Install PyDev in Eclipse IDE

    Reference: Eclipse和PyDev搭建完美Python开发环境(Windows篇) Reference: Install the PyDev plug-in for Eclipse Do ...

  8. 在 Ubuntu 15.04 中使用 ubuntu-make、Eclipse 4.4、Java 8 以及 WTP

    Ubuntu 今天发布新版本了 其实昨天(2015-04-23)我就看到了 Ubuntu 发布新版本的新闻,下班后回家的第一件事就是访问 Ubuntu 的官网,很可惜,没有提供下载.今天(2015-0 ...

  9. Ubuntu杂记——Ubuntu下Eclipse搭建Maven、SVN环境

    正在实习的公司项目是使用Maven+SVN管理的,所以转到Ubuntu下也要靠自己搭环境,自己动手,丰衣足食.步骤有点简略,但还是能理解的. 一.安装JDK7 打开终端(Ctrl+Alt+T),输入  ...

随机推荐

  1. 性能测试之Jmeter学习(三)

    一.Jmeter执行顺序规则: 元件执行顺序的规则很简单,在同一作用域名范围内,测试计划中的元件按照如下顺序执行. (1)配置元件(config elements ) (2)前置处理程序(Per-pr ...

  2. sublime text3配置node.js环境,以及出现的问题

    1) 下载sublime并安装,下载列表:https://www.sublimetext.com/3 2) 下载sublime的nodejs插件,需是集成Nodejs插件到sublime中,下载地址: ...

  3. java集合框架之聚合操作stream

    参考http://how2j.cn/k/collection/collection-aggregate/702.html#nowhere 聚合操作 JDK8之后,引入了对集合的聚合操作,可以非常容易的 ...

  4. TypeScript完全解读(26课时)_5.TypeScript完全解读-函数

    5.TypeScript完全解读-函数 新建function.ts.然后在index.ts内引用 给函数定义参数类型:上面是es5的写法 下面是ts6的写法 一个完整的函数类型.括号 箭头 numbe ...

  5. Identity Server 4 原理和实战(完结)_建立Angular 客户端

    https://material.angular.io/ 第一部是安装angular cli --prefix=ac:前缀 --routing:默认使用路由 style=scss:样式使用scss - ...

  6. 一个例子读懂 JS 异步编程: Callback / Promise / Generator / Async

    JS异步编程实践理解 回顾JS异步编程方法的发展,主要有以下几种方式: Callback Promise Generator Async 需求 显示购物车商品列表的页面,用户可以勾选想要删除商品(单选 ...

  7. Maven虐我千百遍,我待Maven如初恋

    前言 在如今的互联网项目开发当中,特别是Java领域,可以说Maven随处可见.Maven的仓库管理.依赖管理.继承和聚合等特性为项目的构建提供了一整套完善的解决方案,可以说如果你搞不懂Maven,那 ...

  8. 洛谷 - P2283 - 多边形 - 半平面交

    https://www.luogu.org/problemnew/show/P2283 需要注意max是求解顺序是从右到左,最好保证安全每次都清空就没问题了. #include<bits/std ...

  9. Swift 4.0 中的 open,public,internal,fileprivate,private

    1.private private访问级别所修饰的属性或者方法只能在当前类里访问. 2.fileprivate fileprivate访问级别所修饰的属性或者方法在当前的Swift源文件里可以访问. ...

  10. Lightoj1080 【线段树】

    题意: 给你一个0/1的数组,然后给你n段区间,说这个区间里要反转一次,然后给你Q个询问,问你这个位置是什么: 思路: 我们线段树维护一下就好了额: 其实反转的话,还是算次数是不是,奇偶嘛: #inc ...