title: How to build a jar library
body: <p>I'm trying to build a library with netbeans, I'm building so:
  New project...Java...Java application:</p>
  
  <pre><code>package somma;
  
  public class Somma {
  
     public static int somma(int a, int b) {
        int s = a + b;
        return s;
  
     }
  }
  </code></pre>
  
  <p>With this main</p>
  
  <pre><code>package somma;
  
  public class Main {
  
     public static void main(String[] args) {
        int a = 1;
        int b = 2;
        int s = Somma.somma(a, b);
        System.out.println(s);
  
     }
  
  }
  </code></pre>
  
  <p>After that, right click on the project...properties...Buid...Packaging....click on the project again and clean and build. Now I created a Somma.jar, for to try the new library I build an exmple project:</p>
  
  <pre><code>package uselibrary;
  
  import static somma.Somma.somma;
  
  public class UseLibrary {
     public static void main(String[] args) {
        int a = 1;
        int b = 2;
        int s = somma(a, b);
        System.out.println(s);
     }
  }
  </code></pre>
  
  <p>Run correctly, but there is a problem, when I import the library, I would like to avoid this name <strong>import static somma.Somma.somma;</strong> I would like to change with this name <strong>import somma;</strong> 
  How can I do that ?</p>