title: Create jar of a class in order to send objects JAVA
body: <p>I would like to know how to create a jar, usable by other java programs.
  To be clearer I want to send an object to a client. There is a program client and another that plays the server. One creates the obect and the other reads it.</p>
  
  <p>I have my class already done and I know it work well. But I can't just copy paste my class in both programs (I learned that the bad way). 
  So I know that I need a .jar with my class in it.</p>
  
  <p>I managed to create my .jar, add it as an external jar, import it with <strong>import com.classe.object.topic;</strong>, and it is reconized by both programs but when I need my constructor. It doesn't seem to work.</p>
  
  <pre><code>    package com.classe.object.topic;
  
  import java.io.Serializable;
  
  public class ObjectToSend implements Serializable {
  
  
      /**
       * 
       */
      private static final long serialVersionUID = -7934480991083114348L;
  
      String prenom;
        String nom;
        int idGloreg;
        int indPerso; 
        boolean ok;
        String entite;
        int error;
  
  
      ObjectToSend(String prenomP, String nomP, int idGloregP, int indPersoP, boolean okP, String entiteP, int errorP){
             prenom = prenomP ;
             nom= nomP;
            idGloreg = idGloregP;
             indPerso = indPersoP; 
             ok = okP;
             entite= entiteP;
             error = errorP;  
        }
  
  
      }
  </code></pre>
  
  <p>This is what I want to use in both programs but doing </p>
  
  <pre><code>new ObjectToSend("pro", "enc", 134, 10, true, "Tam", 0);
  </code></pre>
  
  <p>Eclipse tells me that he can't find my constructor. Can somebody explain me how to do this or give me a tutorial. That would be really great.
  Thanks in advance for your help.</p>