无法确定当前目录 [英] Cannot determine current directory

查看:94
本文介绍了无法确定当前目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行在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.

这篇关于无法确定当前目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆