KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > examples > mbeans > rmi > Client


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.examples.mbeans.rmi;
10
11 import javax.naming.InitialContext JavaDoc;
12
13 /**
14  * @version $Revision: 1.1 $
15  */

16 public class Client
17 {
18    public static void main(String JavaDoc[] args) throws Exception JavaDoc
19    {
20       InitialContext JavaDoc ctx = new InitialContext JavaDoc();
21       MyRemoteService service = (MyRemoteService)ctx.lookup(MyRemoteService.JNDI_NAME);
22
23       service.sayHello("Simon");
24    }
25 }
26
Popular Tags