在原码中是这样的
try {
return (ORB) Class.forName(className).newInstance();
} catch (ClassNotFoundException ex) {
// Eat the exception and try again below...
} catch (Exception ex) {
throw new INITIALIZE(
"can't instantiate default ORB implementation " + className);
}
显然是Class.forName出错,而Class.forName可以抛出的有
LinkageError - if the linkage fails
ExceptionInInitializerError - if the initialization provoked by this method fails
ClassNotFoundException - if the class cannot be located
自然是前两者。
建议你在ORB orb = ORB.init(args, null);的前面加上
Properties myprop=new Properties();
myprop.setProperty("org.omg.CORBA.ORBClass","com.sun.corba.se.internal.iiop.ORB");
将 ORB orb = ORB.init(args, null);
改为ORB orb = ORB.init(args, myprop);当然要import java.util.*;
试一试, 不行再说
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货