Hi Jason (cc to the list),
I set the CP variable like so: CP=$MAIN/BaseX.jar:$MAIN/lib/custom/dita-ng.jar:$MAIN/lib/*:$MAIN/lib/custom/*:$CLASSPATH
This appears to be slightly different than the example you linked Christian. I’m using BaseX 9.0.2. Does this make a difference?
The start scripts in the official distributions are created from the GitHub examples I linked, so they are slightly different.
I added an echo $CLASSPATH line under the CP variable. When I run the script, the echo statement is blank.
In the script, no value will be bound to the $CLASSPATH variable. Instead, you can assign values to this variable by yourself, which will then be appended to the $CP variable. If you didn’t do so, and if your Linux environment does not have any other values assigned to this variable (which is the default), the output will necessarily be empty.
Is there a way to see how the classpath is set when running this script?
To answer the "how": It will be set via the line that you will find some lines below in the script, and the -cp Java argument:
exec java -cp "$CP" $BASEX_JVM org.basex.BaseX "$@"
If you want to know which value is bound to $CP, try "echo $CP". In Java, the full user class path at runtime will be bound to the "java.class.path" system property. It can e.g. be retrieved via proc:property('java.class.path') [1].
Christian