Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: How to write a client to use an RMI service

Java: How to write a client to use an RMI service
{filelink=408}

import java.rmi.*;
import java.util.*;
public class RMIClient
{
    protected static RMIContract RMIClt = null;
    public static void main(String[] args)
    {
        try {
          RMIClt = (RMIContract)Naming.lookup(RMIContract.RGSTNAME);
            // invok distant method
            Date today = RMIClt.getRemoteDate( );
            System.out.println(today.toString( ));
        } catch (Exception e) {
            System.err.println("Remote Exception: " + e.getMessage( ));
            e.printStackTrace( );
        }
    }
}

Users who found this page were searching for:

  • removing border tkinter checkbox
  • pass dictionary argument python
  • send multipart using java
  • python script arguments
  • change import directory in python

No comments yet.

Leave a Comment