每次都要source /etc/profile才能使java环境生效,如何解决呢?
~/.bashrc里面加一句source /etc/profile 保存。并source /etc/profile 就可以了。
当然也有人说,不建议把环境变量写到profile里面,在/etc/profile.d/java.sh里面写入环境变量
每次都要source /etc/profile才能使java环境生效,如何解决呢?
~/.bashrc里面加一句source /etc/profile 保存。并source /etc/profile 就可以了。
当然也有人说,不建议把环境变量写到profile里面,在/etc/profile.d/java.sh里面写入环境变量
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。