I am using procrun to run a java application as a service.
I used following to set path:
set PATH="dir1;dir2;%PATH%"
procrun.exe //US//%SERVICE_NAME% ++Environment PATH=%PATH%
which updates environment value in registry as:
But, in my Java application when I try to get the value of PATH:
System.getenv("PATH")
I get only the first value ( i.e. dir1 in above case. If I set the path to dir2;dir1;%PATH%
, I get only dir2)
Am I retrieving in a wrong way or setting in a wrong way?