无法确定当前目录
我正在尝试运行在Netbeans中成功创建的.jar文件,并且收到以下错误:
I am trying to run a .jar file that was created successfully in Netbeans and I am receiving the following error:
VM初始化期间发生错误java.lang.Error: 属性init:无法确定当前的工作目录.在 java.lang.System.initProperties(本机方法)位于 java.lang.System.initializeSystemClass(System.java:1070)
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:1070)
我键入的运行.jar的命令是
The command that I type to run the .jar is
java -jar "/path to the dist forlder/EOPPrototype.jar"
我的类路径如下:
CLASSPATH=/opt/netbeans-7.1.2/ide/modules/ext/mysql-connector-java-5.1.13- bin.jar:/h/USERS/local/pagola/NetBeansProjects/mylib/dist/mylib.jar:/h/USERS/local/pagola/NetBeansProjects/EOPPrototype/build/classes:.
我想念什么?
尝试在目录中调用java -version
时遇到了相同的错误,该目录已从另一个终端会话中删除.当然,在这种情况下,java could not determine the current working directory
仅仅是因为它不存在.
I saw the same error when I was trying to call java -version
inside a directory, which I already had deleted from another terminal session. Of course in that case java could not determine the current working directory
, simply because it didn't exist.