jdk linux 环境配置
2024-05-30 14:55:15
amethystfob
1、一般jdk都存放在 /usr/local/java 中,解压
2、vim /etc/environment
3、文件的末尾,添加:
export JAVA_HOME=/usr/local/java/jdk1.8.0_271
export JRE_HOME=/usr/local/java/jdk1.8.0_271/jre
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
4、修改profile文件:
vim /etc/profile
5、文件的末尾,添加:
export JAVA_HOME=/usr/local/java/jdk1.8.0_271
export JRE_HOME=/usr/local/java/jdk1.8.0_271/jre
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin
6、重启配置:
source /etc/profile
7、java -d64 -version
标题:jdk linux 环境配置
作者:amethystfob
地址:https://newmoon.top/articles/2024/05/30/1717052115838.html
欢迎各路大侠指点留痕: