XQuery进程:执行如何执行外部程序?

XQuery进程:执行如何执行外部程序?,xquery,exe,execute,exist-db,Xquery,Exe,Execute,Exist Db,我正在windows上运行exist db,希望执行外部windows程序 这在普通windows外壳内工作: C:\path\to\webGLRtiMaker.exe C:\path\to\ImageFile.rti -q 90 我想从我的xquery脚本中执行相同的程序(我已经根据指定的路径将所有需要的文件上传到我的exist db): xquery版本“3.1”; 导入模块命名空间进程=”http://exist-db.org/xquery/process在“java:org.exist

我正在windows上运行exist db,希望执行外部windows程序

这在普通windows外壳内工作:

C:\path\to\webGLRtiMaker.exe C:\path\to\ImageFile.rti -q 90
我想从我的xquery脚本中执行相同的程序(我已经根据指定的路径将所有需要的文件上传到我的exist db):

xquery版本“3.1”;
导入模块命名空间进程=”http://exist-db.org/xquery/process在“java:org.exist.xquery.modules.process.ProcessModule”中;
声明变量$options:='
/数据库/应用程序/测试项目/图像
/db/apps/executetest/images/image1.rti-q 90
';
(:进程:执行($webRtiMaker,):)
进程:执行('/db/apps/execute test/resources/RTIMaker/webGLRtiMaker.exe',$options)
即使我只执行没有参数的程序(如果我在windows中执行它,我会在命令提示符中获得参数作为概述,因此我也会收到某种输出):

process:execute('/db/apps/execute test/resources/RTIMaker/webGLRtiMaker.exe',)
但我得到了一个错误:

exer:ERROR执行进程时发生IO错误/db/apps/execute test/resources/RTIMaker/webGLRtiMaker.exe:无法运行程序“/db/apps/execute test/resources/RTIMaker/webGLRtiMaker.exe”:CreateProcess ERROR=2,系统找不到文件

我将此作为参考:


我做错了什么?

我最近没有尝试过这个,但请尝试以下方法:

import module namespace process="http://exist-db.org/xquery/process" at "java:org.exist.xquery.modules.process.ProcessModule";

let $cmd := 'C:\path\to\webGLRtiMaker.exe C:\path\to\ImageFile.rti -q 90'
return
    <results>{process:execute($cmd, <options/>)}</results>
导入模块命名空间进程=”http://exist-db.org/xquery/process在“java:org.exist.xquery.modules.process.ProcessModule”中;
让$cmd:=“C:\path\to\webGLRtiMaker.exe C:\path\to\ImageFile.rti-q 90”
返回
{进程:执行($cmd,)}

网站上有一篇关于它的文章。

我最近没有尝试过这一点,但请尝试以下内容:

import module namespace process="http://exist-db.org/xquery/process" at "java:org.exist.xquery.modules.process.ProcessModule";

let $cmd := 'C:\path\to\webGLRtiMaker.exe C:\path\to\ImageFile.rti -q 90'
return
    <results>{process:execute($cmd, <options/>)}</results>
导入模块命名空间进程=”http://exist-db.org/xquery/process在“java:org.exist.xquery.modules.process.ProcessModule”中;
让$cmd:=“C:\path\to\webGLRtiMaker.exe C:\path\to\ImageFile.rti-q 90”
返回
{进程:执行($cmd,)}

网站上有一篇关于它的文章。

不幸的是,无法启动存储在数据库中的可执行文件。java API要求直接访问文件系统上的文件,而“/db/…”路径不是。

不幸的是,无法启动存储在数据库中的可执行文件。java API要求直接访问文件系统上的文件,而“/db/…”路径不是

import module namespace process="http://exist-db.org/xquery/process" at "java:org.exist.xquery.modules.process.ProcessModule";

let $cmd := 'C:\path\to\webGLRtiMaker.exe C:\path\to\ImageFile.rti -q 90'
return
    <results>{process:execute($cmd, <options/>)}</results>