文档章节

Getting Started:Eclipse:Installing Eclipse on Ubuntu

开源中国首席带头大哥
 开源中国首席带头大哥
发布于 2016/11/28 13:31
字数 1139
阅读 13
收藏 0
点赞 0
评论 0

Getting Started:Eclipse:Installing Eclipse on Ubuntu

(Redirected from Installing Eclipse on Ubuntu)

Contents

 [hide

NEW way of using Eclipse for OpenDaylight

Please see GettingStarted: Eclipse instead of below now.

OLD CONTENT, no longer applicable

The recommended way to install Eclipse on Ubuntu is using the distribution's package manager. But unfortunately the Ubuntu distribution contains Eclipse version is 3.8.1-5.1 which does not support Maven integration because the required package org.eclipse.m2e.core requires Eclipse Luna (see this question on Stack Overflow for more details). The Luna is not packaged for Ubuntu (yet) so the manual installation is the only option.

Installing Eclipse on Ubuntu manually can become a peculiar task that can irreparably damage your Ubuntu installation if done improperly. Additionally, the Eclipse Luna exhibits bugs which may confuse new users into thinking it is broken while in reality it is not. The following installation instructions were tested with package eclipse-java-luna-SR1-linux-gtk-x86_64.tar.gz, MD5 b2ccdb8be4588c79b9ed8b7a80ebf8b0, SHA1 161640688a8d4c0523e14ecb7017813dd33a99cd installed on Ubuntu 14.04.1 running on a Oracle VM VirtualBox virtual machine.

Installing Eclipse the easy way

  1. Open a terminal (Ctrl-Alt-T) and switch it to root permissions by entering:

    $ sudo su

  2. Make sure Eclipse Indigo is NOT installed in your Ubuntu. You may need to remove both "eclipse" and "eclipse-platform" packages to get rid of it. If it still gets into way when trying to install Luna using this easy way, you may need to look at the "hard way" below.

    # apt-get remove eclipse eclipse-platform

  3. Install a Java 1.7 JDK:

    # apt-get install openjdk-7-jdk

  4. Install Maven:

    apt-get install maven

  5. Get rid of the root access as you won't need it anymore:

    # exit

  6. Download Eclipse. The "for Java EE Developers", "for Java Developers" and "for RCP and RAP Developers" versions all seem to work. Currently the file which was tested to work is (note that it is for 64 bit Ubuntu version) available at this page
  7. Extract the Eclipse installation tarball into your home directory:

    $ cd

    $ tar -xzvf <path/to/your-tar-file>

  8. Increase the memory for the Eclipse installation by modifying the ~/eclipse/eclipse.ini file.
    • Change the -Xmx setting (line 20) to be AT least 1G, recommended 2GB. (i.e. -Xmx2048m).
    • Change the -XX:MaxPermSize (line 18) to at most 512m. If you have the -Xmx setting set to 1G, then I suggest to use a lower value, for example 300m.
  9. Run the Eclipse:

    $ ~/eclipse/eclipse

  10. If everything seems to work, return back to GettingStarted: Eclipse and continue from step 5 in the section "Installing Eclipse". The Maven Integration software packages as installed in the step 4 are already installed in the Luna so that step can be safely skipped.

When something goes wrong

Normally, everything should go OK and there should be no problem using the Eclipse Luna installed this "easy way". However in a few cases the eclipse fails to work properly, especially if you tried to use Eclipse Indigo that is supplied by the Ubuntu Package Manager. Here are some tips how to try to recover your Eclipse installation:

  1. Uninstall both "eclipse" and "eclipse-platform" packages:

    # apt-get remove eclipse eclipse-platform

  2. Eclipse Luna can usually pick up workspaces from Eclipse Indigo and upgrade them "on the fly" but sometimes things get screwed up. If your Eclipse is doing strange things after you load the workspace, try deleting the workspace (after you exit Eclipse) and then creating it from scratch.
  3. Sometimes bad workspace can damage the Eclipse installation. If you tried to reuse the workspace and after that failed, you have troubles recreating it from scratch, try deleting both, the "eclipse" directory in your home directory and also the workspace directory. Only AFTER both are gone, proceed with the extraction of the eclipse installation tarball.
  4. Make sure you have the Java JDK you intend to use BEFORE you try to run Eclipse for the first time.
  5. Your Eclipse installation could also get damaged by a misbehaving plugin. In that case deleting the Eclipse installation and creating a new one from scratch will usually do the trick.

Installing Eclipse the hard way

Usually, extracting the Eclipse Luno into your home directory shall be enough to allow you to work with it. But sometimes the package requires to be installed into "/opt" and refuses to work properly or to work at all when installed elsewhere. In that case (if you are not a Linux guru) it is often easier to just reinstall the OS from scratch (remember to back up your data first). However sometimes reinstallation of the OS is not feasible.

The following workflow was used to install Eclipse Luno on one such misbehaving system, however it is not guaranteed that this type of misbehavior will be exactly the same in your case so your mileage may vary. These instructions assume you already have the JDK and Maven packages installed and the installation package downloaded as described in the "easy way" installation instructions.

  1. Open a terminal (Ctrl-Alt-T) and switch it to root permissions by entering:

    $ sudo su

  2. Extract the Eclipse installation package into /opt:

    # cd /opt

    # sudo tar -xzvf <path_to_the_downloaded_package>

  3. Increase the memory for the Eclipse installation by modifying the /opt/eclipse/eclipse.ini file. See the "easy way" for instructions.
  4. Create a startup script for the Eclipse:

    # cd /usr/local/bin

    # echo 'ECLIPSE=/opt/eclipse/eclipse' >eclipse

    # echo 'exec $ECLIPSE "$@"' >>eclipse

    # chmod +x eclipse

  5. Now exit the root mode and start the installed eclipse:

    # exit

    $ eclipse

  6. Confirm the dialog box asking you to create a workspace.
  7. This instance of eclipse has problems integrating into the Ubuntu's window manager. Examples include the menu not working properly (the submenus won't show up at all when the main menu items are clicked, preventing the user from using any commands from the menu). To fix the problem first close the introductory tab that was opened and then exit the eclipse. After you start it again, it should work without problems.
  8. Now go back to GettingStarted: Eclipse and continue from step 5 in the section "Installing Eclipse". The Maven Integration software packages as installed in the step 4 are already installed in the Luna so that step can be safely skipped.

Creating new workspaces in Eclipse installed the hard way

The integration problem mentioned in the installation instructions will show its ugly head each time you create a new workspace in the Eclipse Luna. This can happen either when you specify nonexistent/empty directory in the dialog box asking you for a pointer to workspace or you delete or rename the default workspace (to start from scratch). When this happens, restart Eclipse to finalize the freshly created workspace and fix the behavior.

© 著作权归作者所有

共有 人打赏支持
开源中国首席带头大哥
粉丝 10
博文 136
码字总数 88446
作品 0
南京
程序员
Installing sbt on Linux

Installing from a universal package Download ZIP or TGZ package and expand it. Ubuntu and other Debian-based distributions DEB package is officially supported by sbt. Ubuntu and......

openthings
2015/12/24
56
0
GettingStarted:Development Environment Setup

GettingStarted:Development Environment Setup Contents [hide] 1 Overview 2 Quick Start 3 Manual Set Up 3.1 Mac OS-X 3.2 Linux Operating System 3.3 Download and install the Java J......

LeBlancs
2016/11/30
15
0
[译]RoboVM后台在libgdx nighties里的第一次演示

原文链接RoboVM backend in libgdx nightlies and first performance figures! 翻译原文链接:http://www.maiyang.me/posts/2013/09/12/robovm-backend-in-libgdx-nightlies-and-first-perfo......

maiyang
2013/09/12
1K
0
ActivityManager: Warning: Activity not started,...

Activity not started, its current task has been brought to the front的解决办法 2011-05-08 19:36

gavin_jin
2012/04/14
0
0
Scala学习笔记(2):开发环境的搭建

下载和安装Scala 前往http://www.scala-lang.org/downloads 下载Scala在各个平台的安装包,安装后即可在运行scala编译器和交互式命令行环境(interactive interpreter)。除此之外为了更加方便...

chengyao2
2013/04/29
0
1
ubuntu11.10搭建eclipse c/c++环境

1.安装eclipse: 第一种是通过Ubuntu自带的程序安装功能安装Eclipse,应用程序 ->Ubtuntu软件中心,搜Eclipse安装即可。 第二种方法是用命令:应用程序->附件->终端 然后输入(中间可能需要你...

我是一只鱼
2011/10/29
0
0
#fresh start# 1. install ubuntu and java

Today i installed ubuntu alongside windows 7 on my laptop and also setted up a java EE development environment. I decided to change to java from .net some while ago, it is a dif......

hotdancing
2014/03/08
0
0
Ubuntu搭建Eclipse+JDK+SDK的Android

今晚重装Ubuntu系统,重新安装了一套eclipse+jdk+SDK的Android开发平台 一 安装配置Eclipse环境 1 下载安装包 Eclipse: eclipse官方下载网站, 或直接下载eclipse-jee-indigo-SR1-linux-gt...

鉴客
2012/03/09
5.9K
1
Getting Started with Heroku

Last Updated: 21 December 2011 getting started overview quick start Table of Contents · Step 1: Sign-Up · Step 2: Install the Heroku Toolbelt · Step 3: Login · Step 4: Depl......

小熊猫大暴走
2011/12/29
0
0
Ubuntu搭建Eclipse+JDK+SDK的Android

今晚重装Ubuntu系统,重新安装了一套eclipse+jdk+SDK的Android开发平台 一 安装配置Eclipse环境 1 下载安装包 Eclipse: eclipse官方下载网站, 或直接下载eclipse-jee-indigo-SR1-linux-gt...

长平狐
2013/01/06
40
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

CoreText进阶(七)-添加自定义View和对其

CoreText进阶(七)-添加自定义View和对其 效果  实现代码如下: - (void)viewDidLoad { [super viewDidLoad]; self.edgesForExtendedLayout = UIRectEdgeNone; self.view.bac......

aron1992
4分钟前
0
0
Python爬虫 爬取百合网的女人们和男人们

学Python也有段时间了,目前学到了Python的类。个人感觉Python的类不应称之为类,而应称之为数据类型,只是数据类型而已!只是数据类型而已!只是数据类型而已!重要的事情说三篇。 据书上说...

p柯西
15分钟前
0
0
在Java中,你真的会日期转换吗

1.什么是SimpleDateFormat 在java doc对SimpleDateFormat的解释如下: SimpleDateFormatis a concrete class for formatting and parsing dates in a locale-sensitive manner. It allows fo......

Java小铺
24分钟前
0
0
Linux系统梳理---系统搭建(二):tomcat的安装和使用

上一章讲到JDK的安装使用,这一章主要记录下服务器tomcat的安装以及部署一个项目. 1.下载tomcat,这里下载的是apache-tomcat-8.5.32.tar.gz 2.创建文件夹,便于管理,和JDK一样,在usr目录下创建t...

勤奋的蚂蚁
34分钟前
0
0
ES15-聚合

1.Terms Aggregation 分组聚合 2.Filter Aggregation 过滤聚合

贾峰uk
36分钟前
0
0
【2018.07.19学习笔记】【linux高级知识 20.27-20.30】

20.27 分发系统介绍 20.28 expect脚本远程登录 20.29 expect脚本远程执行命令 20.30 expect脚本传递参数

lgsxp
38分钟前
0
0
10.32/10.33 rsync通过服务同步~10.35 screen工具

通过服务的方式同步要编辑配置文件:[root@linux-xl ~]# vim /etc/rsyncd.confport=873log file=/var/log/rsync.logpid file=/var/run/rsyncd.pidaddress=192.168.43.21[tes...

洗香香
41分钟前
0
0
与女儿谈商业模式 (3):沃尔玛的成功模式

分类:与女儿谈商业模式 | 标签: 经济学 沃尔玛 陈志武 2007-05-10 09:09阅读(11279)评论(30) 与女儿谈商业模式 (3):沃尔玛的成功模式 陈志武 /文 沃尔玛(Wal-Mart)是另一个有意思的财...

祖冲之
48分钟前
0
0
网页加载速度优化方法总结

1、减少请求 最大的性能漏洞就是一个页面需要发起几十个网络请求来获取诸如样式表、脚本或者图片这样的资源,这个在相对低带宽和高延迟的移动设备连接上来说影响更严重。 2、整合资源 对开发...

Jack088
54分钟前
0
0
dubbo学习

https://blog.csdn.net/houshaolin/article/details/76408399

喵五郎
今天
0
0

没有更多内容

加载失败,请刷新页面

加载更多

下一页

返回顶部
顶部