Linux

1、首先是安装java
【Linux】2、然后用vi编辑器打开profile文件vi /etc/profile将下面的内容添加到/etc/profile文件的最后
3、source在/etc/profile里面增加环境变量
4、如果不用/etc/profile使配置文件生效,则配置文件是不会生效的