|
Hi, Does the server program register itself with the RMI registry? Does the client program request this registered class? An example might be. On the server AddServerImpl class, main method: try { System.setSecurityManager(new RMISecurityManager() ); AddServerImpl server = new AddServerImpl(); Naming.rebind("//Myserver":1099" + "/myserver", server); } On the client side: theServer = (AddServerIntf)Naming.lookup("rmi://Myserver:1099" + "/myserver"); where Myserver is the name of your server system and 1099 is the port number (1099 happend to be the default). When you start the RMI registry, the registry program must be able to find the server class in it's classpath. It took me a while to figure that one out. Mike --- jana reddy <janareddy@netscape.net> wrote: > I am working on two AS400 machines.I have made one > as the server and another > as Client machine respectively.I am working on RMI > on these two machines. > > My pgm names are: > AddServerIntf.java /class (Interface pgm) > AddServerImpl.java /class (pgm that implements > "AddServerIntf.java") > AddServer.java /class (main pgm for the > server that updates > RMIRegistry) > AddClient.java /class (Client Side pgm) > > AddServerImpl_Skel.class (Skeleton) > AddServerImpl_Stub.class (Stub) > > > I have followed the following steps to execute a > method that is residing on > the server machine by calling a pgm from the Client > Machine. > > Step A: > I have copied > AddServerIntf.class, > AddServerImpl.class, > AddServerImpl_Skel.class, > AddServerImpl_Stub.class and > AddServer.class on the Server Machine. > > I have copied > AddClient.class, > AddServerImpl_Stub.class and > AddServerIntf.class on the client machine. > > Step B: > I have set the Classpath to the current working > directory.From the command > line on the "Server machine" the following 2 > commands were executed > start rmi registry > java AddServer > > Step C: > From the command line on the "Client machine" ,the > following command with the > name of the Client pgm and the IP Address of the > Server followed by 2 > parameters were typed: > start AddClient (IPAddress of Server param1 > param2) > > After executing the above command I get a message: > java.rmi.NotBoundException : AddServer > > Pls let me know as to how to invoke the method > residing at the Server end.. > > regards, > > > ____________________________________________________________________ > Get your own FREE, personal Netscape WebMail account > today at http://webmail.netscape.com. > +--- > | This is the JAVA/400 Mailing List! > | To submit a new message, send your mail to > JAVA400-L@midrange.com. > | To subscribe to this list send email to > JAVA400-L-SUB@midrange.com. > | To unsubscribe from this list send email to > JAVA400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner: > joe@zappie.net > +--- __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.