title: java -cp on Windows problem
body: <p>Can someone please tell me why this java command in a .bat file won't run my java program on WinXP? I have all my jar files in a folder called lib and my class files in a package folder mypackage.</p>
  
  <pre><code>java -cp ".;.\lib\poi-3.7-20101029.jar;.\lib\jsr173_1.0_api.jar;..." mypackage.MyClassWithMain
  </code></pre>
  
  <p>I have tried all sorts of things to no avail. I get a ClassNotFound error as soon as the program attempts to use some of the classes in the jar files. So, I think there's something wrong with my -cp option. It does find my main(). </p>
  
  <p>I want to give this program to someone who doesn't know a thing about computers, so I want them to be able to double-click the .bat file and go.</p>
  
  <p>I wrote everything on a mac without much problem.</p>
  
  <p>I bet the moderator is going to slap me upside the head for this question, but I did search extensively for an answer to this.</p>
  
  <p>Thanks you!
  John</p>
  
  <p>Sorry, I should have put in the entire command line:</p>
  
  <p>java -cp ".;.\libs\jsr173_1.0_api.jar;.\libs\poi-3.7-20101029.jar;.\libs\poi-ooxml-3.7-20101029.jar;.\libs\poi-ooxml-schemas-3.7-20101029.jar;.\libs\resolver.jar;.\libs\xbean.jar;.\libs\xbean_xpath.jar;.\libs\xmlbeans-qname.jar;.\libs\xmlpublic.jar" excelsifter.ExcelSifterController</p>
  
  <p>This is all on one line. I tried / instead of \, but that didn't seem to work. Everything I could find on this indicates that for windows you have to use the backslash.
  All the dependencies are here, as far as I know. At least my mac doesn't complain when I use essentially the same command.</p>
  
  <p>My directory containing my .bat file contains the excelsifter package (a folder called excelsifter) and the folder libs with all the jar files in it.
  Thanks, John</p>