'How can I provide IntelliJ macros to VM Options for a tomcat run configuration?

I need to pass project relative paths to my tomcat run configuration. IntelliJ supports macros such as {PROJECT_DIR} but not for the VM Options field. There is an Open Issue for this feature but Jetbrains is not addressing it (yet).

Given these limitations is there another way to provide these variables while still retaining IDE Tomcat debugging/connectivity features.

Intellij settings dialog



Solution 1:[1]

I'm afraid there is no workaround until the referenced issue is addressed. It's planned for IDEA 13 release, but you should be able to try it earlier, as soon as it's implemented and the EAP build with this feature is released.

Pass the hardcoded paths right now.

Solution 2:[2]

You can use Path Variable in this case. IntelliJ Settings

Go to Settings > Appearance & Behavior > Path Variables
And Add your Name and Value.
Then you can use it via MACRO

IntelliJ Run/Debug Configurations

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 CrazyCoder
Solution 2 st.huber