webapps-runtime
在 Windows、Linux 和 macOS 系统上,从命令行配置 MATLAB Runtime 以与 MATLAB Web App Server 一起使用
语法
说明
webapps-runtime list 返回当前配置的 MATLAB® Runtime 版本的列表。
webapps-runtime add 将 runtime_pathruntime_path 指定的 MATLAB Runtime 安装路径添加到服务器配置中。
webapps-runtime remove 启动交互式提示,从服务器配置中删除 MATLAB Runtime 安装的路径。
webapps-runtime remove 从服务器配置中删除由 runtime_pathruntime_path 指定的 MATLAB Runtime 安装的路径。
webapps-runtime [--version | -v] 返回已安装的 MATLAB Web App Server™ 的版本。
webapps-runtime [--help | -h] 返回命令行帮助。
示例
列出 MATLAB Runtime 安装
要获取配置用于服务器的 MATLAB Runtime 列表,请在系统命令行中输入:
webapps-runtime listC:\Program Files\MATLAB\MATLAB Runtime\v252 /usr/local/MATLAB/MATLAB_Runtime/v252
添加 MATLAB Runtime 路径
要将 MATLAB Runtime 安装路径添加到服务器配置,请在系统命令行中输入:
webapps-runtime add "C:\Program Files\MATLAB\MATLAB Runtime\v98"MATLAB Runtime configuration updated. Changes will be applied the next time the server is started.
删除 MATLAB Runtime 路径
要从服务器配置中删除 MATLAB Runtime 安装的路径,请在系统命令行中输入:
webapps-runtime remove "C:\Program Files\MATLAB\MATLAB Runtime\v98"MATLAB Runtime configuration updated. Changes will be applied the next time the server is started.
获得 MATLAB Web App Server 版本
要获取已安装的 MATLAB Web App Server 版本,请在系统命令行中输入:
webapps-runtime --versionMATLAB Web App Server (R2025b Release)获取命令行帮助
要获取当前命令的帮助,请在系统命令行中输入:
webapps-runtime --helpUsage:
webapps-runtime -h [ --help ] Display this help message
webapps-runtime -v [ --version ] Display the version of MATLAB Web App Server
webapps-runtime list Lists currently configured MATLAB Runtimes
webapps-runtime add <runtime-path> Adds runtime-path to the MATLAB Runtime configuration
webapps-runtime remove Launch interactive prompt to remove MATLAB Runtimes
from the from the MATLAB Runtime configuration
webapps-runtime remove <runtime-path> Removes runtime-path from the MATLAB Runtime configuration输入参数
详细信息
提示
安全注意事项:当服务器配置为使用 R2023b 之前的 MATLAB Runtime 版本时,unsafe-inline 属性包含在服务器的内容安全策略的 script-src 指令中,并且无法删除。该属性允许 Web App 中包含的内联 JavaScript® 执行和事件处理程序在服务器上执行。有关详细信息,请参阅 webapps-cspolicy。
版本历史记录
在 R2020a 中推出