Hi, I have a file called env.properties embedded within the plug-in jar file. When I run the files outside the context of a plug-in, they run fine. But when I try to call the plug-in from another pom.xml I get the following problem
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> file not found hence cannot load -- listing properties -- -- listing properties -- -- listing properties - The code for above is dmpenvironment = loadProperties(is, log, "com/dmp/util/env.properties"); private static Properties loadProperties(InputStream is, Log log, String fileName) { Properties propFile = new Properties(); try { is = PropertyLoader.class.getResourceAsStream(fileName); System.out.println(PropertyLoader.class.getClassLoader().toString()); if (null != is) propFile.load(is); else System.out.println("file not found hence cannot load"); } catch (FileNotFoundException fnfe) { log.fatal("File not found : ", fnfe); fnfe.printStackTrace(); } catch (IOException ioe) { log.error("IOException while reading property files", ioe); ioe.printStackTrace(); } } public static String getEnvironmentProperty(String property) { dmpenvironment.list(System.out); return dmpenvironment.getProperty(property); } Thank you, Phani Yadavalli ITQA, Caremark Inc, 1000 Lakeside Drive Bannockburn, IL 60015 847-444-6958 847-444-6000 ext 6958 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
