title: Rmi, program is not ending?
body: <p>Hi I have a class that is a remote object and I implemented methods.
  Then I just wanted to test it in my local. So I added a main method on it. 
  Then in main, I called runtUtilApp method , that just executes notepad, after some sleep I finish the working of notepad and I called stop method. After the all execution I wait program to finish execution. But it is still working and not ending.</p>
  
  <p>What is the reason of this ?
  I am thinking wrong ?</p>
  
  <hr>
  
  <pre><code>import java.io.IOException;
  import java.rmi.RemoteException;
  import java.rmi.server.*;
  
  
  
  public class ClientImp extends UnicastRemoteObject implements Remote{
  
      private static final long serialVersionUID = 227L;
      private Process proc;
  
  /**
   * constructor
   */
  public ClientImp() throws RemoteException {
      super();
  }
  
  
  public boolean runApp() throws RemoteException {
      try {
          Runtime rt = Runtime.getRuntime();
          proc = rt.exec("notepad");
          return true;
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
          return false;
      }
  }
  
  
  public boolean stopCurrentUtilApp() throws RemoteException {
      proc.destroy();
      return true;
  }
  
  public static void main(String[] args) {
       client;
      try {
          ClientImp client = new ClientImp();
          client.runUtilApp();
          Thread.sleep(10000);
          client.stopCurrentUtilApp();
      } catch (RemoteException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (InterruptedException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>}</p>