1. 下载JDK8
地址:https://download.oracle.com/otn/java/jdk/8u221-b11/230deb18db3e4014bb8e3e8324f81b43/jdk-8u221-linux-x64.tar.gz
删除自带jdk:
删除命令:
rpm -e --allmatches --nodeps java* 逐个删除
解压:tar -xzvf ...
配置 etc/profile
JAVA_HOME=/usr/lib/java8/jdk18
JRE_HOME=/usr/lib/java8/jdk18/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
export JAVA_HOME JRE_HOME PATH CLASSPATH
生效:source /ect/profile
2. 下载Openjdk8 源码、
https://download.java.net/download/openjdk/jdk8/promoted/b132/openjdk-8-src-b132-03_mar_2014.zip
3. 搭建虚拟机
4. 挂载共享磁盘
vmware-hgfsclient
vmhgfs-fuse .host:/share /home/dahui/share
编译:
./configure --with-target-bits=64 --with-boot-jdk=/usr/lib/java8/jdk18/ --with-debug-level=slowdebug --enable-debug-symbols ZIP_DEBUGINFO_FILES=0
nohup make all ZIP_DEBUGINFO_FILES=0
报错,根据提示处理:
错误2:
错误3:
错误4:
到这一步 配置成功:
make: 直接输入make 即可
编译成功:
Part2. eclipse调试
本地安装eclipse环境:
参考文章:
https://blog.csdn.net/tjiyu/article/details/53725247
eclipse下载:
http://ftp.jaist.ac.jp/pub/eclipse/technology/epp/downloads/release/2019-03/R/eclipse-java-2019-03-R-linux-gtk-x86_64.tar.gz
安装c++插件:
后续配置参考:https://blog.csdn.net/leonliu06/article/details/78495202