Hello --
This is with BaseX 10.1 on a linux box:
18:02 graydon % java -version
openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment (Red_Hat-17.0.4.0.8-1.fc36) (build 17.0.4+8)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.4.0.8-1.fc36) (build 17.0.4+8, mixed mode, sharing)
In the BaseX GUI,
proc:execute('/usr/bin/java','-version')
gives me the expected version information as an error, despite a return code of zero:
<result><error>openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment (Red_Hat-17.0.4.0.8-1.fc36) (build 17.0.4+8)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.4.0.8-1.fc36) (build 17.0.4+8, mixed mode, sharing)
</error><code>0</code></result>
From a console,
/usr/bin/java -cp /home/graydon/bin/coffeepot-package/coffeepot-1.99.8/coffeepot-1.99.8.jar org.nineml.coffeepot.Main
works fine, in as much as I get the list of coffeepot usage information I expect if it's run without arguments.
proc:execute('/usr/bin/java','-cp /home/graydon/bin/coffeepot-package/coffeepot-1.99.8/coffeepot-1.99.8.jar org.nineml.coffeepot.Main')
returns
<result><error>Unrecognized option: -cp /home/graydon/bin/coffeepot-package/coffeepot-1.99.8/coffeepot-1.99.8.jar org.nineml.coffeepot.Main
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
</error><code>1</code></result>
I suspect I'm doing something wrong, but it's not at all clear to me what.
Anyone have suggestions?
Thanks!
Graydon