Path Variables Not Working

I am trying to use path variables and found that when I start my project in debug mode using the tomcat plugin, that none of my path variables are honoured. I have a debug point in the application. When I reach it I am calling the System.getenv() method using the Expression Evaluation window. I don't see my path variable anywhere.

I have also tried using the environment variables as part of the tomcat plugin on the Startup/Connection tab. I see the same thing. I do however see the JAVA_OPTS environment variable in there as I have set up some VM options and those seem to make it there. I can call System.getProperties() and see them there.

Am I missing something? Am I using path variables incorrectly?

2 comments

Hello.

Do you mean Settings / Path Variables? Their meaning is a bit tricky. They are something completely different to environment variables.

If user creates a path variable like:
. USER_VAR = /path/variable/value

And then in any IDE setting value type a path like:
. Some Setting = /path/variable/value/and/then/my.file

Then IDE saves this value in .xml configs like:
. ... SomeSetting ... $USER_VAR$/and/then/my.file

This is the main purpose of these variables. Nothing more. I.e.: a) they are for saving configs only, b) user does not explicitly refer to USER_VAR. He should not type "USER_VAR" anywhere, it is inserted automatically on config save.

Is the case with Tomcat become more clear? Questions are welcome, if necessary.

Regards,
Alexander.

0

Hello.

I'm working on Windows platform and I've added path variable like c:\somepath. Then I used it in run configuration for working folder and for program argument as $var$\someAnotherPath. After reopening project path in working folder is ok and looks like  c:\somepath\someAnotherPath, but for program argument path looks like c:/somepath\someAnotherPath. It has "/" instead of "\". Is here some workaround or how can I solve this ?

 

Regards,

Alexander

0

Please sign in to leave a comment.