cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Faded-Maximus
Level 2

Environment Variables

I have set some environment variables by adding them to my profile and exporting them.

var1 is set as /home/user/folder.

When I use $E(var1)/test/sample.txt I get an error message saying the file $E(var1)/test/sample.txt in the wizard doesn't exist. Checking the path for errors, it actually does exist.

What am I doing wrong?
Labels (1)
0 Kudos
(1) Reply
enanrum
Level 9

How are using this?

If you do an 'env' make you see your variable?

And the file does exist:

/home/user/folder/test/sample.txt

Try the following in a custom action:

String var1 = arg0.resolveString("$E(var1)");
JOptionPane.showMessage(null, "var1 = " + var1);

or

String sampFile = arg0.resolveString("$PATH($E(var1)/test/sample.txt")));

Regards,
Tom
0 Kudos