Title: What is the current working directory when I launch my program from the IDE?

If you create a run configuration then you can specify the current working directory in the Working Directory field. If you leave the Working Directory field blank then the current working directory is set to the project folder.

If you launch a program without a run configuration (i.e. by opening the source code and pressing the run button, or "Run As " menu item) then the current working directory is set to the project's output folder.

If you create a run configuration and want the same behavior as when running without a run configuration then set the Working Directory to your project's output folder.

For example, if your application's properties are in a file named myprog.properties in your project's resources folder then you can leave the Working Directory field blank and specify the properties file in the System Properties field as follows:

-Discobol.conf=resources/myprog.properties

Or you can set the Working Directory field to "output" or another subfolder and specify the properties file in the System Properties field as follows:

-Discobol.conf=../resources/myprog.properties

Authored by: Veryant Support on Tue, Aug 24th, 2010 at 7:00 PM
This question has been viewed 6786 times so far.
Online URL: http://support.veryant.com/support/phpkb/question.php?ID=145

Powered by PHPKB Knowledge Base Software