Announcement

Collapse
No announcement yet.

getResourceAsStream() not able to read properties file from resource directory

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • getResourceAsStream() not able to read properties file from resource directory

    I'm working on an interface where the vendor has wrapped their API in a JAR. This JAR is making a call to read a properties file like this:

    Code:
    getClass().getClassLoader().getResourceAsStream("someFile.properties");
    There is a resource directory set up which includes the JAR and its dependencies and several properties files. MC shows someFile.properties in the listing for the resource directory.

    This JAR errors when run, it logs an error that it cannot read the properties file. The JAR is fairly well written and appears to error differently when it cannot read the file versus when the file is malformed or missing a required property.

    I cannot easily change this other vendors JAR. Are there any settings or other locations where I can put the properties file it is looking for so it can read it?
    Last edited by jbartels; 03-28-2017, 05:48 AM.
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.
Working...
X