环境参数
CentOS Linux release 7.4.1708 (Core)
eclipse:oxygen.3a.Release(4.7.3a)
安装Eclipse
- 创建文件夹
[vagrant@localhost ~]$ mkdir eclipse
[vagrant@localhost ~]$ cd eclipse
- 下载Eclipse安装包
wget http://mirrors.ustc.edu.cn/eclipse/technology/epp/downloads/release/oxygen/3a/eclipse-jee-oxygen-3a-linux-gtk-x86_64.tar.gz
查看下下载的包
[vagrant@localhost eclipse]$ ll
总用量 338140
-rw-rw-r-- 1 vagrant vagrant 346253117 4月 10 15:00 eclipse-jee-oxygen-3a-linux-gtk-x86_64.tar.gz
- 解压安装包
tar -zxvf eclipse-jee-oxygen-3a-linux-gtk-x86_64.tar.gz
创建快捷方式
- 创建软链接
ln -s /home/vagrant/eclipse/eclipse/eclipse /home/vagrant/桌面
可能出现的问题
- 在CentOS上打开Eclipse报如下错误
A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: /opt/eclipse/jre/bin/java java in your current PATH
解决办法:
进入eclipse的安装文件夹
/home/vagrant/eclipse/eclipse
创建文件夹jre并进入
mkdir jre
cd jre
给你安装的JDK创建一个链接到这个文件夹下
[vagrant@localhost jre]$ ln -s ~/java/jdk1.8.0_172/bin/ bin
[vagrant@localhost jre]$ ll
总用量 0
lrwxrwxrwx 1 vagrant vagrant 36 5月 2 10:01 bin -> /home/vagrant/java/jdk1.8.0_172/bin/