主要内容

本页采用了机器翻译。点击此处可查看最新英文版本。

webapps-runtime

WindowsLinuxmacOS 系统上从命令行配置 MATLAB Runtime 以与 MATLAB Web App Server 一起使用

安全注意事项:当服务器配置为使用 R2023b 之前的 MATLAB® Runtime 版本时,unsafe-inline 属性包含在服务器的内容安全策略的 script-src 指令中,并且无法删除。该属性允许 Web App 中包含的内联 JavaScript® 执行和事件处理程序在服务器上执行。有关详细信息,请参阅 webapps-cspolicy

说明

webapps-runtime list 返回当前配置的 MATLAB Runtime 版本的列表。

webapps-runtime add runtime_pathruntime_path 指定的 MATLAB Runtime 安装路径添加到服务器配置中。

webapps-runtime remove 启动交互式提示,从服务器配置中删除 MATLAB Runtime 安装的路径。

webapps-runtime remove runtime_path 从服务器配置中删除由 runtime_path 指定的 MATLAB Runtime 安装的路径。

webapps-runtime [--version | -v] 返回已安装的 MATLAB Web App Server™ 的版本。

webapps-runtime [--help | -h] 返回命令行帮助。

示例

列出 MATLAB Runtime 安装

要获取配置用于服务器的 MATLAB Runtime 列表,请在系统命令行中输入:

webapps-runtime list
C:\Program Files\MATLAB\MATLAB Runtime\v242
/usr/local/MATLAB/MATLAB_Runtime/v242

添加 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 --version
MATLAB Web App Server (R2024b Release)

获取命令行帮助

要获取当前命令的帮助,请在系统命令行中输入:

webapps-runtime --help
Usage:
  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

输入参数

全部折叠

指定要添加到服务器配置或从服务器配置中删除的 MATLAB Runtime 安装的路径。

示例: "C:\Program Files\MATLAB\MATLAB Runtime\R2024b"

详细信息

全部折叠

版本历史记录

在 R2020a 中推出