API 示例的命令行切换

可通过命令行实用程序将该示例作为应用程序运行。
打开命令行实用程序并按以下格式运行命令:
java –jar SampleDocgen.jar <docspecpath> [-home filepath] [-workArea filepath] [-remoteURL URL] [-remoteUser user] [-remotePassword password] [-Duser.language=language_code] [-Duser.country=country_code]
表 1. API 的命令行选项
命令行选项 描述
-home 值为 config 文件夹的父目录的完整路径。
  • 可选(如果已安装 Rational® Publishing Engine)。
  • 必需(如果未安装 Rational Publishing Engine)。
-workArea 值为 Rational Publishing Engine 用于创建临时文件的完整路径。如果未指定值,那么 Rational Publishing Engine 会使用 temp 文件夹。可选。
-remoteURL 用于远程生成文档。值为 Web Service 应用程序 的 URL。如果未指定值,那么会在本地生成文档。
-remoteUser 值为向 Web Service 应用程序 认证时使用的用户名。可选。
-remotePassword 值为向 Web Service 应用程序 认证时使用的密码。 可选。
-Duser.country 常见 Java™ 运行时环境交换机对于 Rational Publishing Engine 并不唯一。

值是与语言设置相对应的国家或地区代码。可选。

-Duser.language 常见 Java 运行时环境交换机对于 Rational Publishing Engine 并不唯一。

值为语言代码。可选。

本地生成文档:
java –jar SampleDocgen.jar “d:\test\rpe\sample.dsx” -home “d:\test\rpe\home -workArea “d:\tmp -Duser.language=pt -Duser.country=BR
远程生成文档:
java –jar SampleDocgen.jar “d:\tmp\testRemote.dsx” -remoteURL “http://server:8080/rpews/docgen” -remoteUser rpe_user -remotePassword password -Duser.language=pt -Duser.country=BR

结果


反馈