System.getProperty(“user.dir”) anomaly in Eclipse

后端 未结 1 1809
走了就别回头了
走了就别回头了 2020-12-06 22:08

In my current project settings, I have configured Eclipse to place the compiled .class files in the /bin directory.

My puzzle is that, when I run the application via

相关标签:
1条回答
  • 2020-12-06 22:59

    In Eclipse, the working directory defaults to the project directory.
    You can change this in the run properties
    (Project->Properties->Run/DebugSettings->Edit->Arguments tab, at the bottom of the page).

    Edit: Actually, the easiest way to get to it is Run->Open Run Dialog->Arguments tab.
    It's been a while since I used Eclipse.

    From an example of Eclipse Setup New Project

    alt text http://apps.sourceforge.net/mediawiki/sprite2d/nfs/project/s/sp/sprite2d/a/ae/EclipseNewProjectDebugArguments.jpg

    0 讨论(0)
提交回复
热议问题