方法一:
首先,使用apt-get安装eclipse会启动失败,log中报很多错误,网上的解决方案看了很多,都指向openjdk的问题,很难搞,如果非要这么安装,可以:
1、参考eclipse官方安装指导https://wiki.eclipse.org/Eclipse/Installation
2、参考eclipse官方linux安装报错指导 https://wiki.eclipse.org/IRC_FAQ#I_just_installed_Eclipse_on_Linux.2C_but_it_does_not_start._What_is_the_problem.3F
方法二:建议
1、使用ubuntu官方推荐的方案:
https://www.ubuntu18.com/install-eclipse-ubuntu-18/
使用snap安装,试过可以正常打开,很nice
方法三:强烈建议
下载eclipse官方的instaler
https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2019-03/R/eclipse-inst-linux64.tar.gz
解压后直接双击运行,然后选择安装,有JAVA C++可选
可以选择使用ubuntu18.04 eclipse 做C++开发