二个月不弄,就忘了,记一下吧,脑子。。。

一、软件环境

1.centOS 7.x

2.JDK1.8

二、具体过程

1.切换到自己用户如xiaoming

2.进入用户根目录,编辑.bash_profile文件

> vim .bash_profile

修改内容:

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

JAVA_HOME=/home/xiaoming/jdk/jdk1.8.0_171
CLASSPATH=.:$JAVA_HOME/bin/tools.jar
PATH=$JAVA_HOME/bin:$PATH

export CLASSPATH PATH
~                                                                                                                                                          
~                                                                                                                                                          
~       

 

 

 

保存之后,source一下:

> source .bash_profile

测试

> echo $JAVA_HOME

 

 

 

 

GitHub 加速计划 / li / linux-dash
10
2
下载
A beautiful web dashboard for Linux
最近提交(Master分支:6 天前 )
186a802e added ecosystem file for PM2 5 年前
5def40a3 Add host customization support for the NodeJS version 5 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐