I have a Java program which executes a bunch of python and shell scripts, which in turn will call some other python/shell scripts. If I use relative paths in any of the scripts, would the paths be based off where the original Java program was executed? Or would it be a different location?
-
possible duplicate of Permissions in Chain of Program Execution– RaystafarianSep 24, 2014 at 18:05
-
Try Process Monitor to locate it yourself.– M. A.Sep 24, 2014 at 18:11
-
@Raystafarian It isn't a duplicate. Both of these questions are related but they are two different things. This one asks about the working directory of these processes, while the question you linked to is about file permissions.– lzamSep 24, 2014 at 18:15
-
1@Raystafarian not sure how these two questions both asked by me are duplicates :) one is about permission the other about relative path– MaxSep 24, 2014 at 18:16
-
1@Max I am pretty sure it should be the same. Why don't you just try it and see though?– lzamSep 24, 2014 at 18:17
|
Show 1 more comment
1 Answer
Assuming you don't cd
/chdir
anywhere in your code, the paths are relative to your current directory when you launched the Java program (not the location of the Java program itself).