For us cygwin users, this line uses a cygwin path (/cygdrive/c/...). The -Dlog4j.configurationFile argument to Java is then invalid. Using PATHVAR instead of STARDOG solves the problem.
Similarly, on line 28 of the stardog script, the -Dstardog.install.location=${STARDOG} passes Java a cygwin path, and using PATHVAR solves the problem.
I’m not sure if I’m just using an old version of Cygwin or what, but if I use PATHVAR when populating -Dlog4j.configurationFile I just get a different flavor of error. It goes from File not found in file system or classpath: /cygdrive/c/opt/stardog/log4j2.xml to Invalid URI C:/opt/stardog/log4j2.xml because of Unknown protocol: c. Are you working around that in some way?
Regardless, I will open a ticket to look further into this issue for an upcoming release. Thanks for reporting!
I didn’t add this to my bug report because I didn’t know whether you’d want to force the URI to be an absolute path, or to add the scheme elsewhere in the script, or whatever.