In the Run/Debug Configurations dialog, I want to specify the path of my Tomcat Server > Startup/Connection > Startup script and Shutdown script as relative to the project directory. If I enter a relative path, it appears IDEA looks for the script file relative to the bin directory (in my case, C:\Program Files\JetBrains\IntelliJ IDEA 5.1\bin). Is it possible to overcome this problem (with an IDE/project setting, or a variable perhaps)?

Hello Vegard,

In the Run/Debug Configurations dialog, I want to specify the
path of my Tomcat Server > Startup/Connection >
Startup script and Shutdown script as relative to the
project directory. If I enter a relative path, it appears IDEA looks
for the script file relative to the bin directory (in my case,
C:\Program Files\JetBrains\IntelliJ IDEA 5.1\bin). Is it possible to
overcome this problem (with an IDE/project setting, or a variable
perhaps)?

In fact you need to specify an absolute path in the UI, and if the option
"References to resources outside project file directory" is set to "Relative",
the path will be saved in the project file as relative.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"

The Project Settings > Modules > Paths > For files outside project file directory setting was set to "Use relative path" already, but this setting does not seem to have any effect on my run/debug configuration.

The paths to my local application server (Tomcat) startup/shutdown scripts are saved in the *.iws file and must be absolute paths to work (unless the script is located in the IDEA bin directory). I noticed that in the *.ipr *.iml AND the *.iws files that some paths are specified with variables like \$PROJECT_DIR\$ or \$MODULE_DIR\$. For my startup scripts, I tried the paths, "\$PROJECT_DIR\$\tomcat-startup.cmd" and "file://\$PROJECT_DIR\$/tomcat-startup.cmd" without success. IDEA always expects the scripts to be relative to the IDEA bin directory unless the paths are specified as absolute paths.

If only I could somehow specify the working directory as the current project directory...