我正在尝试使用下面列出的示例代码连接到 MKS Integrity Client
try
{
IntegrationPointFactory ipf = IntegrationPointFactory.getInstance();
CmdRunner cmdRunner = ipf.createLocalIntegrationPoint().getCommonSession()
.createCmdRunner();
cmdRunner.setDefaultHostname("sslmmks1");
cmdRunner.setDefaultPort(80);
cmdRunner.setDefaultUsername("vmenon");
cmdRunner.setDefaultPassword("Railsonfire1@3");
Command issuesView = new Command(Command.IM, "issues");
issuesView.addOption(
new Option("fields","ID,Type,Summary"));
issuesView.addOption(
new Option("query", "Quick Query"));
Response resp = cmdRunner.execute(issuesView);
System.out.println(resp);
} catch (Exception ex) {
ex.printStackTrace();
}
我收到以下错误
com.mks.api.response.ICLaunchException:无法连接到 Integrity Client,属性 IntegrityClient.launchOnDemand 未设置为允许自动启动。在 com.mks.connect.ClientCmdRunnerImpl.icInitialize(Native Method) 在 com.mks.connect.ClientCmdRunnerImpl.checkIntegrityClientForLaunch (ClientCmdRunnerImpl.java:71) 在 com.mks.connect.ClientCmdRunnerImpl.executePreCondition(ClientCmdRunnerImpl.java:95) 在 com .mks.connect.AbstractCmdRunner.executeCommand(AbstractCmdRunner.java:235) at com.mks.connect.AbstractCmdRunner.execute(AbstractCmdRunner.java:394) at org.jpmc.mks.Mksmain.main(Mksmain.java:25)