原文:每次都要source /etc/profile才能使java环境生效,如何解决呢?

每次都要source etc profile才能使java环境生效,如何解决呢 .bashrc里面加一句source etc profile 保存。并source etc profile 就可以了。 当然也有人说,不建议把环境变量写到profile里面,在 etc profile.d java.sh里面写入环境变量 ...

2017-12-15 12:37 0 1518 推荐指数:

查看详情

Mac 每次都要执行source ~/.bash_profile 配置的环境变量才生效

自己在 ~/.bash_profile 中配置环境变量, 可是每次重启终端后配置的不生效.需要重新执行 : $source ~/.bash_profile 发现zsh加载的是 ~/.zshrc文件,而 ‘.zshrc’ 文件中并没有定义任务环境变量。 解决办法 在~/.zshrc文件最后 ...

Wed Aug 25 17:59:00 CST 2021 0 113
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM