How to configure "Working Directory:" from "Configuring External Tools ..." in Eclipse?

When I open the source file from my project and I run the custom build script, I want the working directory to be initialized in the current working directory from which the source file was opened. Any ideas how to do this?

UPDATE: Also, how can I set the "Working Directory" one level above the actual working directory?

+4
source share
1 answer

I'm not sure that I understand exactly what you need, but there are several variables that can be used in external launch configurations.

In your description, most likely to put $ {resource_loc} in the field "Working directory:".

From the description:

Returns the absolute path to the resource file system. The target resource is the selected resource if no arguments are specified, or the resource identified by the relative path of the workspace.

Alternatively, $ {container_loc} might be more appropriate if you need to run in a directory:

Returns the absolute file system path to the resource container. The target resource is the selected resource if no arguments are specified, or the resource identified by the relative path of the workspace.

+3
source

All Articles