title: NanoHTTPD: How do I add it to a current Java eclipse project and use it?
body: <p>This is my first time with Java and Eclipse. I started a brand new Java project and I want to import/add NanoHTTPD into it. How do you this?</p>
  
  <p>This is NanoHTTPD's site: <a href="http://nanohttpd.com" rel="nofollow">http://nanohttpd.com</a></p>
  
  <p>Thanks!</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Lesson learned, be specific or you get backslashed for asking. I edited the question and here's some background and the problem I'm running into.</p>
  
  <p>I'm developing a Nodejs backend that needs to query a JAVA project I was given. Pipes are a no go because the services will run on different machines. Tomcat seems like an overkill so I decided to use NanoHTTPD to develop the web service. I come from Ruby &amp; Nodejs so compilation and Eclipse are very new to me. First off, I have no JAR file just TAR and ZIP and from what I read they are fundamentally different. However, I tried importing the TAR and ZIP files as recommended but the structure I get in Eclipse does not seem right compared to the JRE System Library or others I've seen. Notwithstanding, I went ahead and tried to import the package from my Main.java file </p>
  
  <pre><code>package fi.iki.elonen;
  
  public class Main {
      public static void main (String[] args)
      {
          System.out.println("Main");
      }
  } 
  </code></pre>
  
  <p>When I try to run it I get the following error:</p>
  
  <pre><code>Exception in thread "main" java.lang.Error: Unresolved compilation problem:
  at Main.main(Main.java:4)
  </code></pre>
  
  <p>I found a great article from IBM <a href="http://www.ibm.com/developerworks/library/j-classpath-unix/" rel="nofollow">"Managing the Java classpath (UNIX and Mac OS X)"</a> where it mentions that an IDE such as Eclipse can alleviate the pain of dealing with the source path, classpath and compilation. Unfortunately, I'm afraid this is where I might be getting stuck.</p>
  
  <p>I tried uploading images of what I have but apparently I'm not popular enough yet to do it.</p>
  
  <p>Could someone help me figuring out how to not only import libraries but using them on projects? Even just a URL to a clear Linux/Mac OS X post that explains import with multiple packages would be great.</p>