tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Peremsky <>
Subject JAR file not finding external properties files
Date Tue, 01 May 2007 19:34:33 GMT
I created some utility classes that read proeprties files (e.g. com.mvp.utils.ExtProperties).
In the method where I try to load the properties file I have
  package com.mvp.utils;
  class ExtProperties {
     private static PropertyResourceBundle loadProperties(String propsFile) {
        PropertyResourceBundle prb =
           (PropertyResourceBundle) ResourceBundle.getBundle(propsFile);
       return prb;
  This file is then compiled and placed in a jar file, which is copied to my Tomcat\common\lib
directory. Whenver I try to call the ExtProperties class it fails to find the properties file.
If I include the properties file in the jar file it finds it with no problem. I assume that
this is a class loader problem (which which I am not very familiar).
  What do I need to do to get the class in the jar file to find the properties files external
to it? Do I need to specify the full path to the file?
  - Mike

Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message