$ROOTDIR is not a supported interface. You should use "$APPDIR" instead.
Having said that, the real problem is likely your use of backslashes. I
recommend using forward slashes and also enclosing it in single quotes,
like this:
-Djava.security.policy='$APPDIR/all.policy'
If you need to use backslashes for some reason, then you will need to
use two (the first is treated as an escape character).
-- Kevin
On 11/23/2019 8:37 AM, Michael Hall wrote:
I am trying to come up with a simple Windows bat file execution of jpackage. I
would like to use the builtin ROOTDIR variable. How should this be done?
Not very familiar with Windows.
This
-Djava.security.policy=$ROOTDIR\app\all.policy
Gets
Error: Invalid Option: [-Djava.security.policy=$ROOTDIR\app\all.policy]
This
-Djava.security.policy=%ROOTDIR%\app\all.policy
Gets this
Error: Invalid Option: [-Djava.security.policy=\app\all.policy]
These are included in the —java-options parameter.
This thread seems to end up indicating that $ROOTDIR should work on windows
https://mail.openjdk.java.net/pipermail/core-libs-dev/2019-November/063361.html
<https://mail.openjdk.java.net/pipermail/core-libs-dev/2019-November/063361.html>
Although it is for finding the runtime and not included in —java-options