正在加载图片...
//The code is used to create the client application used by the HelloApp application Import java rmi Import Javax. naming ublic class len ublic static void main(String args) InitialContext Init=new InitialContext 0: HelloHome Home=(HelloHome) Init lookup(HelloJ") Hello HelloObjHome createD String RetValHelloObj. say Hello(Ron Floyd) System. out. println( Returned: Retval Helloobj remove catch (ava. rmi RemoteException exception) System. out. printIn( Remote exception occurred: exception catch gavax, ejb. CreateException exception n导入 Java. rm和 System. out. printIn( Create exception occurred: exception Javax. naming包 catch (avax ejb. Remove Exception exception) Java. rm包包含RMI调 用的支持 System. out. printIn( Remove exception occurred: exception) JJavax naming包包含 catch (avax naming. NamingException exception JNDI支持 System. out. println( Naming exception occurred: + exception)客户应用 ◼导入java.rmi和 javax.naming包 ◼java.rmi包包含RMI调 用的支持 ◼javax.naming包包含 JNDI支持
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有