title: Extracting Common Java Package
body: <p>I have a project that Contains a bunch of java packages that I have recently understood are needed in a new project that I'm going to develop. I want these two projects to have the same code base so I don't have to update the common libraries in both. How can I achieve this in Exlipse? </p>
  
  <p>my current set up is like this</p>
  
  <pre><code>Project1
    CommonPackage
    SpecifictProjectCode1
  
  Project2
    SpecifictProjectCode2
  </code></pre>
  
  <p>I want the following, I think:</p>
  
  <pre><code>Project1
    CommonPackage
    SpecifictProjectCode1
  
  Project2
    CommonPackage
    SpecifictProjectCode2
  
  CommonCodeProject
  </code></pre>
  
  <p>What is the best way to achieve this I understand I could extract a jar file or and include it in both project but I want to be able to debug the code and I also want to keep the code editable. Is it perhaps better to extract the code to a separate project and how do I go about doing that?</p>
  
  <p>Any help is appreciated.</p>