Cannot determine current directory

前端 未结 11 1351
旧时难觅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:21

    I got this error on Mac OS X and this is a genuine error since the directory has vanished. The directory I was when I am executing the commands is \target.

    The problem was I opened two terminals in the other terminal I ran mvn clean install and the target directory from PROJECT DIR got deleted and recreated.

    My old terminal from where I was executing Java commands is not in a valid directory.

    The file descriptor is invalid since the directory got deleted by Maven.

    When I moved back to the parent directory and the changed back to the target directory, the java command started working correctly as expected.

提交回复
热议问题