title: Cannot find .properties file in Classpath
body: <p>i am having trouble using a third party .jar in my JSP web application.
  This third party .jar is using a .properties file which should be located in the classpath.</p>
  
  <p>This is a code snippet used for locating the file (extracted from the .jar):</p>
  
  <pre><code>...
  for (String classpath : new String[]{ "sun.boot.class.path", "java.class.path", "java.ext.dirs" })
              for (String path : System.getProperty(classpath).split(System.getProperty("path.separator")))
                  listSearchPaths.add(new File(path));
  ...
  </code></pre>
  
  <p>From what I understand, the application is looking in three different system properties:</p>
  
  <ul>
  <li>sun.boot.class.path</li>
  <li>java.class.path</li>
  <li>java.ext.dir</li>
  </ul>
  
  <p>After building, the required .properties file is located in the same folder as the third party .jar</p>
  
  <p>Project.war/WEB-INF/lib/file.properties <br>
  Project.war/WEB-INF/lib/thirdparty.jar</p>
  
  <hr>
  
  <p>Here is the problem: <br></p>
  
  <p>I am trying to run this .war on a tomcat6 server on Solaris. The server is starting successfully, but at runtime, when using the thirdparty functionality, the application cannot find the .properties file in classpath.</p>
  
  <p>I tried several things like: <br>
   - setting .properties in tomcat common/shared loader <br>
   - setting .properties in classpath tag in build.xml during compilation</p>
  
  <p>I also printed out the current classpath during runtime, which is only resulting in  "/usr/apache/tomcat6/apache-tomcat-6.0.37/bin/bootstrap.jar"</p>
  
  <p>I know that there is a difference between tomcat classpath and java classpath but I cannot get the hang of it right now.</p>
  
  <p>Any ideas?
  Thanks in advance.</p>