centos系统使用source命令提示notavalia identitier的解决方法

centos系统使用source命令提示notavalia identitier的解决方法

这篇文章给大家分享的是有关centos系统使用source命令提示notavalia identitier的解决方法的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。

centos使用source命令提示not a valia identitier错误解决办法

1、centos下配置jdk环境变量。切换至/etc下,使用命令:cd /etc

centos系统使用source命令提示notavalia identitier的解决方法

2、Xshell配合Xftp打开该目录:

centos系统使用source命令提示notavalia identitier的解决方法

3、查找到profile文件:

centos系统使用source命令提示notavalia identitier的解决方法

4、使用记事本开始,在末尾添加:

export JAVA_HOME=/usr/local/java/jdk1.7.0_79

export JRE_HOME=/usr/local/java/jdk1.7.0_79/jre

export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATH

export PATH=$JAVA_HOME/bin: $PATH

centos系统使用source命令提示notavalia identitier的解决方法

5、使用source命令使其生效。命令:source /etc/profile

centos系统使用source命令提示notavalia identitier的解决方法

6、错误原因:刚才编辑的有空格。认真检查:

centos系统使用source命令提示notavalia identitier的解决方法

7、 去掉空格。再次使用source命令。就可以了。

感谢各位的阅读!关于“centos系统使用source命令提示notavalia identitier的解决方法”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!