title: NoClassDefFoundError on org.jruby.Main
body: <p>I'm trying to install the hpricot gem on my Windows machine using JRuby 1.4.0RC1. I'm trying to follow the advice to the related question (see -> <a href="https://stackoverflow.com/questions/726412/installing-hpricot-for-jruby/1323619#1323619">Installing hpricot for JRuby</a>). </p>
  
  <p>Per the answer's advice I pulled the git head of hpricot and from it's dir ran:</p>
  
  <pre><code>jruby -S rake package_jruby
  cd pkg
  sudo jgem install ./hpricot-0.8.1-jruby.gem
  </code></pre>
  
  <p>But when I run this I get the following NoClassDefFoundError:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/jruby/Main
  Caused by: java.lang.ClassNotFoundException: org.jruby.Main
          at java.net.URLClassLoader$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClassInternal(Unknown Source)
  Could not find the main class: org.jruby.Main.  Program will exit.
  </code></pre>
  
  <p>Apparently my JRUBY_HOME\lib\jruby.jar is getting lost.</p>
  
  <p>running jruby -v works fine, so I'm confused where my class path is getting messed up.</p>