深有同感,并且我得更惨。
我用的是:Corba+Java+Servlet--->JSP,在Win2K下运行良好,当全部移植到linux环境中以后,出现了以下问题:
   无法用Javac编译Servlet文件,错误提示:同上。它好像不识别ORG目录下的类(关于CORBA),不知到哪里下载适合于Linux环境的ORG。
   所以更谈不上正常运行了。
希望能有机会交流一下:[email protected]

解决方案 »

  1.   

    whyyy78(笑笑) 你在用户的.bash_profile中设置JAVA_HOME了吗?我用的是JDK SE 1.3.1_01,编译没问题。这问题,这里的人都没有遇见过吗?
      

  2.   

    先问一下:
    ncRef.resolve(path);
    path是在哪里,如何定义的??
      

  3.   

    private NameComponent nc;
    private NameComponent path[];
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~

        public org.omg.CORBA.Object getRemoteObject(JApplet applet,String objectPackage){
         org.omg.CORBA.Object obj = null ;
        
    try{
    ORB orb = ORB.init(applet,null);

    //org.omg.CORBA.Object objRef=orb.resolve_initial_references("NameService");
    //读取远端的信息,并构造对象
    org.omg.CORBA.Object objRef=orb.string_to_object( readIOR(applet) );
    NamingContext ncRef=NamingContextHelper.narrow(objRef);
    //
    this.nc   = new NameComponent(objectPackage,"");
    this.path = new NameComponent[]{nc};
                               //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    System.out.println(this.path);

    //About.Show ShowRef=ShowHelper.narrow(ncRef.resolve(path));
    obj = this.narrow(ncRef.resolve(path));
                              //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    }catch(Exception e){
    System.err.println("Error:" + e);
    e.printStackTrace(System.out);
    }
    finally{
    return obj;
    }
        }