Cannot determine current directory

前端 未结 11 1467
旧时难觅i
旧时难觅i 2021-02-03 16:40

I am trying to run a .jar file that was created successfully in Netbeans and I am receiving the following error:

Error occurred during initialization of V

11条回答
  •  长发绾君心
    2021-02-03 17:29

    I got the same error -

    Error occurred during initialization of VM

    java.lang.Error: Properties init: Could not determine current working directory.

    by just doing 'java -version' (you would think it wouldn't need to bring up a virtual machine just to answer a simple question like 'what version are you?')

    A higher up element (that between the slashes) of the directory path of the pwd had spaces in it. When I made the current working directory one which from / downward didn't have any spaces the 'java -version' command got a proper response.

    I'm concluding they didn't account for directories with spaces when they programmed it. But that was version 1.7. I've now loaded version 8 so hopefully it has been corrected.

提交回复
热议问题