iCAx开思网

标题: 请问怎样用Java进行二次开发啊? [打印本页]

作者: huweiqiu    时间: 2009-6-16 08:02
标题: 请问怎样用Java进行二次开发啊?
请问怎样用Java进行二次开发啊?
能用Java开发External的程序吗?

import nxopen.*;
import nxopen.uf.*;
import java.io.*;
import java.net.*;
import java.rmi.*;
import java.rmi.registry.*;
public class UGJavaTest1{
public static void main(String[] args) throws Exception{
  Session theSession;
  try{
theSession = (Session)SessionFactory.get("Session");
   theSession.parts().newDisplay("f:\\hu.prt", Part.Units.MILLIMETERS);
   theSession.parts().saveAll();
        }catch (Exception ex){
   System.out.println(ex.toString());
  }
  System.in.read();
}
}

为什么运行到theSession = (Session)SessionFactory.get("Session");时就报java.lang.reflect.InvocationTargetException啊,有清楚的达人吗?




欢迎光临 iCAx开思网 (https://www.icax.org/) Powered by Discuz! X3.3