【问题标题】:Unexpected exception caught: com.ptc.pfc.Implementation.pfcExceptions$XToolkitGeneralError while running AsyncInstallTest捕获到意外异常:运行 AsyncInstallTest 时出现 com.ptc.pfc.Implementation.pfcExceptions$XToolkitGeneralError
【发布时间】:2022-05-11 23:57:25
【问题描述】:

任何人都可以帮助使用 jlink java 编写简单的程序,以在执行 java 程序时打开 creo 工具。 到目前为止我所做的是,安装了 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);

 }

【问题讨论】:

    标签: java jlink


    【解决方案1】:

    鉴于您的 try 块包含多个与操作系统、库和 CREO 交互的调用,那么您的连接请求失败可能有多种原因。

    记住这一点。

    但是,当所有其他可能性都得到解决后,我将分享今天我们还发现 AsyncConnection_Start 调用中的第二个参数,当传递值 null我们的原因 em> 特定的连接失败。

    当我们将该参数更改为用户可写目录的字符串路径时,启动异步连接的尝试将立即成功。

    到处都有例子表明 null 应该是一个允许的值,但在某些系统上,参数不能为 null。

    正在进行研究以了解造成这种情况的原因。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-06-26
      • 1970-01-01
      • 1970-01-01
      • 2012-11-02
      • 2012-04-26
      • 2023-03-06
      • 2011-08-04
      • 1970-01-01
      相关资源
      最近更新 更多