Getting My Documents path in Java

后端 未结 8 1293
孤城傲影
孤城傲影 2020-12-06 04:21

I need to find my documents path using Java. The following code doesn\'t give me \"accurate\" loation

System.getProperty(\"user.home\");

What sh

8条回答
  •  攒了一身酷
    2020-12-06 05:03

    this is what eclipse does to get the user document folder

    System.getProperty("user.dir") //$NON-NLS-1$
                        + File.separator + "workspace")
    

    Hope it's helpfull!

提交回复
热议问题