title: Trying to implement jcifs and UniAddress and getting NoClassDefFoundError?
body: <p>I am using JCIFS (http://jcifs.samba.org/). My code is simple and taken from the Login.java example:</p>
  
  <pre><code>import jcifs.*;
  import jcifs.smb.*;
  
  public class netp {
      public static void main( String argv[] ) throws Exception {
       System.out.println("START");
  
       String ip = "10.0.0.1";
       String domain = "domain";
       String user = "user";
       String pass = "pass";
  
      UniAddress dc = UniAddress.getByName( ip );
      NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication( domain + ";" + user + ":" + pass );
      SmbSession.logon( dc, auth );
  
       System.out.println("END");
  
       return;
      }
  }
  </code></pre>
  
  <p>Compiling this works if I do this:</p>
  
  <pre><code>javac -cp jcifs-krb5-1.3.17.jar netp.java
  </code></pre>
  
  <p>However, if I run it like this:</p>
  
  <pre><code>java -cp jcifs-1.3.17.jar netp
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Error: Could not find or load main class netp
  </code></pre>
  
  <p>What am I doing wrong? </p>
  
  <p>I've uploaded the complete source code here: </p>
  
  <pre><code>https://www.box.com/s/po4frdmy0obqiroy9anp
  </code></pre>
  
  <p>Note: I am doing this all in Windows.</p>