iCAx开思工具箱

标题: 【求助】Open I-DEAS起步:如何配置OI [打印本页]

作者: spline    时间: 2004-6-7 18:12
标题: 【求助】Open I-DEAS起步:如何配置OI
这回丑大了;现在要转向Open I-DEAS的二次开发了(用java)。我估计是屠龙之术了。
现在请教一个问题:如何配置OI的环境。
启动方法:
oaxx start xterm, 启动一个控制窗口,并进入到运行文件所在位置
然后输入:$OIJAVA MainPrg 运行系统
如何配置编译环境和运行环境
作者: liberty000    时间: 2004-6-7 20:08
虽然不懂,还是帮老大顶一下!
作者: spline    时间: 2004-6-8 11:20
多谢,这下是名副其实的菜鸟了。
作者: spline    时间: 2004-6-10 14:59
总算入门了,做了一个hello World.
不过还是问题很多。希望高手指教。
比如:我在JBuilder里做了一个窗体,在运行时一闪就没了,很困惑
作者: spline    时间: 2004-6-10 15:04
给大家一个例子,是UGS网站提供的。可以用的。
The following simple Open I-DEAS/Java client was developed for I-DEAS 10.   
This application illustrates how to connect to the server of the an active  
I-DEAS session, and send a message to the List WIndow.
  
Start of Java source "HelloIdeas_I10.java"...
import com.sdrc.openideas.OI_ErrorCodes;
import com.sdrc.openideas.OI_GUIServer;
import com.sdrc.openideas.OI_ListRegion;
import com.sdrc.openideas.OI_Server;
import com.sdrc.openideas.util.*;
import org.omg.CORBA.*;
  
/**
  * This program illustrates a very simple Open I-DEAS/Java client application.
  * This program connects to the active I-DEAS session and sends a message to  
  * the List Window.
  *
  * I-DEAS Version : 10 NX
  *
  * Note: For clarity, limited error checking has been implemented.
  */
public class HelloIdeas_I10 extends OI_App
{
    private OI_Server oiServer;
    private ORB orb;
  
    public static void main(String[] args)
    {
  try
  {
      HelloIdeas_I10 myApp = new HelloIdeas_I10 (
    "HelloIdeas_I10",  
    org.omg.CORBA.ORB.init(args, null),
    args,
    null   
      );
  
      myApp.outputToListWindow( "Hello I-DEAS!" );
  
      myApp.destroy();
  
  } catch(org.omg.CORBA.SystemException e) {
      System.err.println (  
    "Detected unexpected CORBA exception, exiting.\n" + e  
      );
      System.exit(1);
  
  } catch(Exception e) {
      System.err.println (  
    "Detected unexpected exception, exiting.\n" + e  
      );
      System.exit(1);
  }
  
  System.exit(0);
    }
  
    public HelloIdeas_I10(String appName, ORB orb, String[] args, String  
serverName)
    {
  super( appName, orb);
  this.orb      = orb;
  try
  {
      oiServer = this.IIOPConnectServer( serverName );
      if ( oiServer  == null )
      {
    System.err.println (  
        "Unable to connect to the server, exiting."
    );
    System.exit(1);
      }
  
  } catch(org.omg.CORBA.SystemException e) {
      System.err.println (  
    "Detected unexpected CORBA exception, exiting.\n" + e  
      );
      System.exit(0);
  }
    }
  
    public void outputToListWindow(String text)
    {
  OI_GUIServer guiServer = oiServer.GetGUIServer();
  OI_ListRegion listRegion = guiServer.GetListRegion();
  listRegion.PutToList( text );
    }
  
    public void destroy()
    {
  orb.shutdown(true);
  orb.destroy();
    }
}
  
REFERENCES/NOTES
----------------
  
===============================================================================
  
COPYRIGHT (C) by EDS PLM solutions
ALL RIGHTS RESERVED.  No distribution except provided under contract
作者: spline    时间: 2004-6-14 19:38
做了了快一周了,依然很困惑。
准备放弃了。
作者: spline    时间: 2004-6-16 18:04
契而不舍 最终总会有结果的。我已经体会到了。
经过了一周的努力,我已经会配置OI的开发环境了。
还可以作一些简单的例子了,可以冒充专家了。
冒得不好,请大家原谅!^_^




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3