有没有人可以帮助编写简单的程序,使用jlink java打开creo工具来执行java程序。我到目前为止所做的是,安装了creo-5.0.0.0和JDK 8和JLink,我试图执行一些程序,我得到上面的错误。请问我是否遗漏了什么?我只是想从路径需要设置和程序运行打开creo工具绘制的基本步骤。我只是一个开发新手。任何帮助都是感激的。谢谢
try
{
proe_cmd = "proeCmd -g:no_graphics -i:rpc_input";
pfcInstallTest.printMsg ("Async install test started.");
System.loadLibrary ("pfcasyncmt");
AsyncConnection ac = pfcAsyncConnection.AsyncConnection_Start (proe_cmd, null);
currSession = ac.GetSession ();
new pfcInstallTest (currSession);
ac.End();
pfcInstallTest.printMsg ("Async install test completed.");
System.runFinalization();
System.exit (0);
}
如果您的try
块封装了几个与操作系统,库和CREO交互的调用,那么可能有几个原因导致您的连接请求失败。
记住这一点。
然而,当所有其他的可能性已经解决,我将分享今天我们也发现第二个参数在AsyncConnection_Start
调用,当传递值null
是一个原因我们的特定连接失败。
当我们将该参数更改为用户可写目录的字符串路径时,那么尝试启动异步连接将立即成功。
随处可见的例子表明,null应该是一个允许的值,但在某些系统中,参数不能为null。
研究正在进行中,以了解导致这种情况的原因。