import java.net.MalformedURLException; import java.rmi.Naming; import java.rmi.NotBoundException; import java.rmi.RemoteException; import javax.swing.JOptionPane; public class ClientOperation { private static RMIInterface look_up; public static void main(String[] args) throws RemoteException { try{ look_up = (RMIInterface) Naming.lookup("//localhost/MyServer"); String txtNum = JOptionPane.showInputDialog("Enter the number"); int number=Integer. parseInt(txtNum); String response = look_up.even(number); JOptionPane.showMessageDialog(null, response); } catch(Exception e){ System.err.println("Server exception: " + e.toString()); e.printStackTrace(); } } }