00000004.htm
来自「水木清华BBS」· HTM 代码 · 共 48 行
HTM
48 行
<HTML><HEAD> <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>发信人: rhythin (多米诺骨牌), 信区: Java <BR>标 题: Re: HLP!ClassLoader! <BR>发信站: BBS 水木清华站 (Wed Apr 7 13:15:41 1999) <BR> <BR>我给你发的信被退回来了, 说没这用户! <BR>Hi, I have partly solved the problem. If on the client side, we use <BR>Object instead of the remote interface to get the stub, no exception <BR>will be thrown. <BR>i.e. <BR>Object obj = Naming.lookup("//foo/bar"); <BR>not RemoteBar obj = (RemoteBar) naming.lookup(...) <BR> <BR>That's why I asked the second question. Though you know the remote <BR>interface of the remote object, you cannot use it to cast the stub you <BR>got, because the class loaded by system will be treated as a different <BR>class. So maybe we have to use reflection to solve the problem, too bad. <BR>【 在 Liyuany (缘分) 的大作中提到: 】 <BR>∶<I> </I><BR>∶<I> 看来真有缘分一说,hehe。我头疼的就是这个问题。我用自己的ClassLoader </I><BR>∶<I> 装入jar文件。然后,利用rmi机制调用远程方法,就会有例外ClassNotFound。好象 </I><BR>∶<I> rmi用的装载器是系统的,它不认识我的ClassLoader装入的类。 </I><BR>∶<I> 不知道你做的是什么项目?能交流一下吗?如果愿意请给我发Email </I><BR>∶<I> <A HREF="mailto:lqw@csc.neu.edu.cn">lqw@csc.neu.edu.cn</A> </I><BR>∶<I> </I><BR>∶<I> 【 在 rhythin (多米诺骨牌) 的大作中提到: 】 </I><BR> <BR> <BR>-- <BR>※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: cascade.cs.ubc.] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?