Hi,
I have a pure Java class that is used by both Java webapps and a JRuby
on
Rails webapp. Within the class, we call:
this.getClass().getClassLoader().getResourceAsStream(propFilePath);
This returns a valid input stream for all the pure Java webapps.
Unfortunately, under JRuby it always returns null. I’ve tried variations
such as:
ClassLoader loader
Class.forName(“org.springframework.context.support.ClassPathXmlApplicationContext”).getClassLoader();
loader.getResourceAsStream(propFilePath);
Sadly, that also returns null.
Are there any known issues or special “gotchas” I should be aware of
when
using getResourceAsStream() from a JRuby on Rails app?
-Sean