title: java jar classpath error help
body: <p>so I set up an executable jar that is in folder C:\folder\folderbaby</p>
  
  <p>the jar contains a whole bunch of calls to mysql using jdbc</p>
  
  <p>if I go from the command line and cd to C:\folder\folderbaby and then run java -jar thejar.jar, it would run properly and access the database just fine</p>
  
  <p>but then if I cd to C:\ and then run java -jar C:\folder\folderbaby\thejar.jar, it would return a whole bunch of errors:</p>
  
  <pre><code>Trying to add database driver (JDBC): RmiJdbc.RJDriver - Error, not in CLASSPATH
  ?
  Trying to add database driver (JDBC): jdbc.idbDriver - Error, not in CLASSPATH?
  Trying to add database driver (JDBC): com.mckoi.JDBCDriver - Error, not in CLASS
  PATH?
  Trying to add database driver (JDBC): org.hsqldb.jdbcDriver - Error, not in CLAS
  SPATH?
  java.sql.SQLException: No suitable driver found for jdbc:idb=experiments.prp
  java.lang.IllegalStateException: Not connected, please connect first!
  false
  </code></pre>
  
  <p>First of all the jar requires a .prop file that contains information about the database to access. The prop file is contained inside the jar itself...I guess the error is there because it couldn't find the prop file even though the prop file is inside the jar</p>
  
  <p>how would I go about fixing this so that the jar is callable even from directory outside where it is contained? </p>
  
  <p><strong>##################EDIT: Content of Manifest.MF#########################</strong></p>
  
  <pre><code>Manifest-Version: 1.0
  Rsrc-Class-Path: ./ mysql-connector-java-5.1.17-bin.jar weka-src.jar weka.jar j.jar
  Class-Path: .
  Rsrc-Main-Class: Main
  Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
  </code></pre>