Error occurred during initialization of VM java.lang.Error: Properties init: Could not determine cur

Posted anmofree

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Error occurred during initialization of VM java.lang.Error: Properties init: Could not determine cur相关的知识,希望对你有一定的参考价值。

在执行hdfs namenode -format时

报错

Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
at java.lang.System.initProperties(Native Method)
at java.lang.System.initializeSystemClass(System.java:1166)

这个错误大概有两种情况:

1、JDK安装之后配置环境变量有问题

2、当前目录不可用

 

我查看了一下  /etc/profile   里配置的JAVA_HOME环境变量,没有错误

于是我退出当前目录,重新执行了hdfs namenode -format,执行成功

 

原因说明:

当前目录被删除过,那么在此目录下执行shell命令就会报错

退出当前目录即可解决

 




以上是关于Error occurred during initialization of VM java.lang.Error: Properties init: Could not determine cur的主要内容,如果未能解决你的问题,请参考以下文章

!MESSAGE Error occurred during status handling

解决ubuntu下error occurred during the signature verification

an error occurred during the file system check错误的解决

TestNG运作报错An interanl error occurred during:"Launching first"

用Eclipse运行Java文件报错Error occurred during initialization of boot layer

Error occurred during initialization of VM java/lang/NoClassDefFoundError