Ubuntu 安装 Eclipse IDE

Ubuntu 安装 Eclipse IDEUbuntu 安装 EclipseIDETh www eclipse org 编辑 gt 编译 gt 链接 gt 运行 1 Other gt IDEandToolsh www eclipse org ide Eclipse 是一个开放源代码的 基于 Java 的可扩展开发平台 就其本身而言 它只是一个框架和一组服务 用于通过插件组件构建开发环境 它能



Ubuntu 安装 Eclipse IDE

编辑 -> 编译 -> 链接 -> 运行

1. Other -> IDE and Tools

2. Eclipse IDE for C/C++ Developers

Home -> IDE -> Desktop IDEs -> Eclipse IDE for C/C++ Developers

Ubuntu 源带 Eclipse,但版本通常是比官网的版本旧,额外的插件一律没有,默认只能开发 Java 程序,推荐直接从官网上下载 Eclipse 安装,有各类捆绑插件用于不同开发用途的 Eclipse 压缩包。

sudo apt-get install eclipse 

2.1 Package Description

An IDE for C/C++ developers with Mylyn integration.

2.2 This package includes:

在这里插入图片描述

3. Installation

cd 
  <你下载文件所在文件夹>
    chmod +x 
   <已下载的安装文件> 
    
  

为了使你的安装对所有用户都有效,用 sudo 运行安装命令并且根据提示操作。

sudo ./ 
  <已下载的安装文件> 
  

为单个用户安装,只需运行安装文件并且根据提示操作。当安装程序询问你时,选择一个安装目录,并且确认这个用户对这个目录有写的权限。

./ 
  <已下载的安装文件> 
  

要运行Eclipse,使用

/bin/eclipse命令。

3.1 Java SDK

在这里插入图片描述

3.2 eclipse-cpp-2018-09-linux-gtk-x86_64.tar.gz

Eclipse 在 ubuntu 16.04 LTS 下是绿色版的。

foreverstrong@strong:~/software$ ll
total 506972
drwxrwxr-x  3 foreverstrong foreverstrong      4096 11月  5 14:14 ./
drwxr-xr-x 23 foreverstrong foreverstrong      4096 11月  2 13:04 ../
-rw-rw-rw-  1 foreverstrong foreverstrong 236908195 11月  5 14:14 eclipse-cpp-2018-09-linux-gtk-x86_64.tar.gz
drwxrwxr-x 10 foreverstrong foreverstrong      4096 11月  2 12:55 pycharm-2016.3.3/
-rwxrwxrwx  1 foreverstrong foreverstrong 282217430 11月  2 11:31 pycharm-professional-2016.3.3.tar.gz*
foreverstrong@strong:~/software$ chmod a+x eclipse-cpp-2018-09-linux-gtk-x86_64.tar.gz 
foreverstrong@strong:~/software$ 
foreverstrong@strong:~/software$ ll
total 506972
drwxrwxr-x  3 foreverstrong foreverstrong      4096 11月  5 14:14 ./
drwxr-xr-x 23 foreverstrong foreverstrong      4096 11月  2 13:04 ../
-rwxrwxrwx  1 foreverstrong foreverstrong 236908195 11月  5 14:14 eclipse-cpp-2018-09-linux-gtk-x86_64.tar.gz*
drwxrwxr-x 10 foreverstrong foreverstrong      4096 11月  2 12:55 pycharm-2016.3.3/
-rwxrwxrwx  1 foreverstrong foreverstrong 282217430 11月  2 11:31 pycharm-professional-2016.3.3.tar.gz*
foreverstrong@strong:~/software$ 
foreverstrong@strong:~/software$ tar -zxvf eclipse-cpp-2018-09-linux-gtk-x86_64.tar.gz 
......
foreverstrong@strong:~/software$ 
foreverstrong@strong:~/software$ ll
total 506976
drwxrwxr-x  4 foreverstrong foreverstrong      4096 11月  5 14:15 ./
drwxr-xr-x 23 foreverstrong foreverstrong      4096 11月  2 13:04 ../
drwxrwxr-x  8 foreverstrong foreverstrong      4096 9月  18 03:49 eclipse/
-rwxrwxrwx  1 foreverstrong foreverstrong 236908195 11月  5 14:14 eclipse-cpp-2018-09-linux-gtk-x86_64.tar.gz*
drwxrwxr-x 10 foreverstrong foreverstrong      4096 11月  2 12:55 pycharm-2016.3.3/
-rwxrwxrwx  1 foreverstrong foreverstrong 282217430 11月  2 11:31 pycharm-professional-2016.3.3.tar.gz*
foreverstrong@strong:~/software$ cd eclipse/
foreverstrong@strong:~/software/eclipse$ ls
artifacts.xml  configuration  dropins  eclipse  eclipse.ini  features  icon.xpm  notice.html  p2  plugins  readme
foreverstrong@strong:~/software/eclipse$ sudo ./eclipse 
[sudo] password for foreverstrong: 
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
foreverstrong@strong:~/software/eclipse$ 
foreverstrong@strong:~/software/eclipse$ sudo ./eclipse 
[sudo] password for foreverstrong: 
log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
Memory pressure relief: Empty the PageCache: =dirty (at 21532672 bytes)
Memory pressure relief: Prune MemoryCache live resources: =dirty (at 21532672 bytes)
Memory pressure relief: Drain CSSValuePool: =dirty (at 21532672 bytes)
Memory pressure relief: Discard StyleResolvers: =dirty (at 21532672 bytes)
Memory pressure relief: Discard all JIT-compiled code: =dirty (at 21532672 bytes)
Memory pressure relief: Dropping buffered data from paused media elements: =dirty (at 21532672 bytes)
Memory pressure relief: Purge inactive FontData: =dirty (at 21532672 bytes)
Memory pressure relief: Clear WidthCaches: =dirty (at 21532672 bytes)
Memory pressure relief: Discard Selector Query Cache: =dirty (at 21532672 bytes)
Memory pressure relief: Prune MemoryCache dead resources: =dirty (at 21532672 bytes)
Memory pressure relief: Prune presentation attribute cache: =dirty (at 21532672 bytes)
Memory pressure relief: Run malloc_trim: -dirty 1036288 bytes (from 21532672 to 20496384)
Memory pressure relief: Release free FastMalloc memory: -dirty 110592 bytes (from 20496384 to 20385792)
Memory pressure relief: Empty the PageCache: =dirty (at 44429312 bytes)
Memory pressure relief: Prune MemoryCache live resources: =dirty (at 44429312 bytes)
Memory pressure relief: Drain CSSValuePool: =dirty (at 44429312 bytes)
Memory pressure relief: Discard StyleResolvers: +dirty 16384 bytes (from 44429312 to 44445696)
Memory pressure relief: Discard all JIT-compiled code: =dirty (at 44445696 bytes)
Memory pressure relief: Dropping buffered data from paused media elements: =dirty (at 44445696 bytes)
Memory pressure relief: Purge inactive FontData: =dirty (at 44445696 bytes)
Memory pressure relief: Clear WidthCaches: =dirty (at 44445696 bytes)
Memory pressure relief: Discard Selector Query Cache: =dirty (at 44445696 bytes)
Memory pressure relief: Prune MemoryCache dead resources: =dirty (at 44445696 bytes)
Memory pressure relief: Prune presentation attribute cache: =dirty (at 44445696 bytes)
Memory pressure relief: Run malloc_trim: -dirty 4718592 bytes (from 44445696 to 39727104)
Memory pressure relief: Release free FastMalloc memory: -dirty 2895872 bytes (from 39727104 to 36831232)
foreverstrong@strong:~/software/eclipse$ 

在这里插入图片描述
Eclipse 运行,会弹出一个窗口,要求用户选择一个工作空间 (Workspace)。在 Eclipse 运行之后,所有的项目和文件缺省情况下都会存储在这个工作空间中,并且我们对 Eclipse 进行的任何设置也都是和 Workspace 相关联的。

在这里插入图片描述

4. Create a launcher shortcut

Open terminal from Unity Dash, Application Launcher, or via Ctrl + Alt + T shortcut key. When it opens, paste below command and run:

gedit .local/share/applications/eclipse.desktop gedit /usr/share/applications/eclipse.desktop sudo gedit /usr/share/applications/eclipse.desktop 

The command creates and opens a launcher file, for current user, with gedit text editor. When it opens, paste below content:

[Desktop Entry] Name=Eclipse Type=Application Exec=/home/USERNAME/java-mars/eclipse/eclipse Terminal=false Icon=/home/USERNAME/java-mars/eclipse/icon.xpm Comment=Integrated Development Environment NoDisplay=false Categories=Development;IDE; Name[en]=Eclipse 

Depends on your installation folder, check out in file browser, change the value in red.

终端的警告不用理会,在弹出的文本编辑器输入:

[Desktop Entry] Name=Eclipse Type=Application Exec=/home/foreverstrong/software/eclipse/eclipse Terminal=false Icon=/home/foreverstrong/software/eclipse/icon.xpm Comment=Integrated Development Environment NoDisplay=false Categories=Development;IDE; Name[en]=Eclipse 

在这里插入图片描述

/usr/share/applications/ 目录下找到 Eclipse 图标,右击 -> Copy To… -> Desktop.

5. An error has occurred. See the log file null.

在这里插入图片描述

foreverstrong@strong:~/Desktop$ pwd /home/foreverstrong/Desktop foreverstrong@strong:~/Desktop$ foreverstrong@strong:~/Desktop$ ll total 12 drwxr-xr-x 2 foreverstrong foreverstrong 4096 11月 6 09:18 ./ drwxr-xr-x 25 foreverstrong foreverstrong 4096 11月 5 20:55 ../ -rwxr-xr-x 1 foreverstrong foreverstrong 262 11月 6 09:18 eclipse.desktop* foreverstrong@strong:~/Desktop$ foreverstrong@strong:~/Desktop$ chmod a+x eclipse.desktop foreverstrong@strong:~/Desktop$ foreverstrong@strong:~/Desktop$ ll total 12 drwxr-xr-x 2 foreverstrong foreverstrong 4096 11月 6 09:18 ./ drwxr-xr-x 25 foreverstrong foreverstrong 4096 11月 5 20:55 ../ -rwxr-xr-x 1 foreverstrong foreverstrong 262 11月 6 09:18 eclipse.desktop* foreverstrong@strong:~/Desktop$ 
foreverstrong@strong:~$ sudo gedit /usr/share/applications/eclipse.desktop 

5.1 log file 目录

/home/foreverstrong/software/eclipse/configuration/.log

!SESSION 2018-11-06 09:14:57.747 ----------------------------------------------- eclipse.buildId=4.9.0.I-0745 java.version=1.8.0_181 java.vendor=Oracle Corporation BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US !ENTRY org.eclipse.osgi 4 0 2018-11-06 09:14:58.353 !MESSAGE Error reading configuration: /home/foreverstrong/software/eclipse/configuration/org.eclipse.osgi/.manager/.fileTableLock (Permission denied) !STACK 0 java.io.FileNotFoundException: /home/foreverstrong/software/eclipse/configuration/org.eclipse.osgi/.manager/.fileTableLock (Permission denied) at java.io.RandomAccessFile.open0(Native Method) at java.io.RandomAccessFile.open(RandomAccessFile.java:316) at java.io.RandomAccessFile. 
  
    (RandomAccessFile.java:243) at org.eclipse.osgi.internal.location.Locker_JavaNio.lock(Locker_JavaNio.java:39) at org.eclipse.osgi.storagemanager.StorageManager.lock(StorageManager.java:391) at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:704) at org.eclipse.osgi.storage.Storage.getChildStorageManager(Storage.java:2068) at org.eclipse.osgi.storage.Storage.getInfoInputStream(Storage.java:2085) at org.eclipse.osgi.storage.Storage. 
   
     (Storage.java:240) at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:175) at org.eclipse.osgi.internal.framework.EquinoxContainer. 
    
      (EquinoxContainer.java:72) at org.eclipse.osgi.launch.Equinox. 
     
       (Equinox.java:34) at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:306) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:242) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595) at org.eclipse.equinox.launcher.Main.run(Main.java:1501) at org.eclipse.equinox.launcher.Main.main(Main.java:1474) 
      
     
    
  

权限问题,sudo chmod -R 777 eclipse.

foreverstrong@strong:~/software$ ll eclipse
total 488
drwxrwxr-x  8 foreverstrong foreverstrong   4096 11月  6 09:30 ./
drwxrwxr-x  4 foreverstrong foreverstrong   4096 11月  5 14:15 ../
-rw-rw-r--  1 foreverstrong foreverstrong 167752 9月  18 03:49 artifacts.xml
drwxrwxr-x 11 foreverstrong foreverstrong   4096 11月  6 09:30 configuration/
drwxrwxr-x  2 foreverstrong foreverstrong   4096 9月  18 03:49 dropins/
-rwxr-xr-x  1 foreverstrong foreverstrong  73064 9月   6 21:10 eclipse*
-rw-rw-r--  1 foreverstrong foreverstrong    628 9月  18 03:49 eclipse.ini
-rw-rw-r--  1 foreverstrong foreverstrong     60 9月   6 19:47 .eclipseproduct
drwxrwxr-x 95 foreverstrong foreverstrong  12288 9月  18 03:49 features/
-rwxr-xr-x  1 foreverstrong foreverstrong 140566 9月   6 21:10 icon.xpm*
-rw-rw-r--  1 foreverstrong foreverstrong   6297 9月  12 19:46 notice.html
drwxrwxr-x  4 foreverstrong foreverstrong   4096 11月  5 20:55 p2/
drwxrwxr-x 10 foreverstrong foreverstrong  57344 9月  18 03:49 plugins/
drwxrwxr-x  2 foreverstrong foreverstrong   4096 9月  18 03:49 readme/
foreverstrong@strong:~/software$ chmod -R 777 eclipse

foreverstrong@strong:~/software$ 
foreverstrong@strong:~/software$ sudo chmod -R 777 eclipse
[sudo] password for foreverstrong: 
foreverstrong@strong:~/software$

在这里插入图片描述

在这里插入图片描述
权限问题,新建目录。

在这里插入图片描述

foreverstrong@strong:~$ ll drwxrwxr-x 3 foreverstrong foreverstrong 4096 11月 6 09:36 eclipse-work/ drwxr-xr-x 3 root root 4096 11月 5 20:55 eclipse-workspace/ foreverstrong@strong:~$ 

6. Eclipse documentation

https://help.eclipse.org/2018-09/index.jsp

References

WORDBOOK

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/201170.html原文链接:https://javaforall.net

(0)
上一篇 2026年3月20日 上午9:55
下一篇 2026年3月20日 上午9:55


相关推荐

  • 国外全能免费主页空间

    国外全能免费主页空间国外全能免费主页空间,支持ASP.NET、PHP、CGI等 [来源:不详|作者:佚名|时间:2007-6-622:19:28|收藏本文]   WebHostforASP.NET提供15M免费主页空间,每月2G的流量限制,web方式上传管理文件,支持ASP、ASP.NET、PHP、Perl、CGI以及Access数据库,无广告。必须拥有顶级域名才能申请,如果您手头上有空

    2022年7月11日
    25
  • 计算机桌面图片怎么设置大小,怎么设置桌面壁纸大小[通俗易懂]

    计算机桌面图片怎么设置大小,怎么设置桌面壁纸大小[通俗易懂]很多人都知道怎麽设置电脑桌面,可真正找到适合自己屏幕的可能很少,图片或大或小,小编为大家分享了设置桌面壁纸大小的方法,下面大家跟着小编一起来了解一下吧。设置桌面壁纸大小方法先查看自己电脑屏幕分辨率,方法:依次打开控制面板\外观和个性化\显示\屏幕分辨率。查看图片的大小:单击图片,将鼠标放在图片图标上,就能看到尺寸。双击图片,用windows照片查看器打开,点击”打开“,选择画图。假设屏幕分辨率:…

    2022年5月15日
    170
  • Spring 中的 18 个注解,你会几个?

    Spring 中的 18 个注解,你会几个?

    2021年7月8日
    95
  • 磁盘占用率100%——哪些程序可以禁用(详细版)【还讲到独立显卡、集成显卡、双显卡、固态硬盘卡机卡死卡顿解决】

    磁盘占用率100%——哪些程序可以禁用(详细版)【还讲到独立显卡、集成显卡、双显卡、固态硬盘卡机卡死卡顿解决】我买内存条之前,电脑超级卡的,我不喜欢用完电脑就关机,经常晚上用完就“睡眠、待机”,第二天早上用电脑,一般都打开谷歌浏览器、网易云音乐、有道词典、Eclipse、Oracle、Tomcat、电脑管家、文件资源管理器;我使用Eclipse编写代码,我都输完一行代码,电脑卡的呀,30分钟至一分钟才有反应,这算是快的,最恶心的是“卡至Eclipse软件自己关闭了”!!!所以只能看看哪些服务进程可以禁用…

    2022年6月26日
    29
  • 详细设计文档格式

    详细设计文档格式1 背景 背景 原因 2 名词解释 对文档中出现新的或不常见的名词 概念或简略语给出定义和解释 3 设计目标 3 1 实现的功能 概要描述要实现的功能 列出要实现的功能点及子功能点 并对每一个功能点进行详细说明 功能点之间的层级和关联关系要明晰 仅描述功能 不需要涉及实现方案 功能取舍等问题 3 2 性能指标 性能目标需要分解到模块 描述对该模块的性能要求

    2026年3月18日
    4
  • CAP以及分区容错性的含义「建议收藏」

    CAP以及分区容错性的含义「建议收藏」一个分布式系统里面,节点组成的网络本来应该是连通的。然而可能因为一些故障,使得有些节点之间不连通了,整个网络就分成了几块区域。数据就散布在了这些不连通的区域中。这就叫分区。当你一个数据项只在一个节点中保存,那么分区出现后,和这个节点不连通的部分就访问不到这个数据了。这时分区就是无法容忍的。提高分区容忍性的办法就是一个数据项复制到多个节点上,那么出现分区之后,这一数据项就可能分布到各个区里。容忍性就提高了。然而,要把数据复制到多个节点,就会带来一致性的问题,就是多个节点上面的数据可能是不一致的。要

    2022年7月25日
    16

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号