title: What is the best practice to transfer a class or an interface to another project or computer?
body: <p>I am writing simple code to try java rmi.</p>
  <p>On the server side i wrote the interface and the implementation class of the object.</p>
  <p>What is the correct way (on eclipse, if it makes any difference) to import the interface i created in the server project to the client project?
  I need a solution that imitates that i am writing the server on a computer and the client on a different one.</p>
  <p>Thank you for your help, here is the client code, Car is the interface i need to import.</p>
  <pre><code>package rmiClient;
  
  import java.rmi.RemoteException;
  import java.rmi.registry.LocateRegistry;
  import java.rmi.registry.Registry;
  
  public class MainClient {
          public static void main(String args[]) throws RemoteException {
                  Registry reg = LocateRegistry.getRegistry(&quot;localhost&quot;, 9999);
                  Car ferrari = (Car) reg.lookup(&quot;supercar&quot;);
          }
  }
  </code></pre>