[jboss-user] [Beginners Corner] - How do you load a properties file

c_eric_ray do-not-reply at jboss.com
Fri Aug 25 17:12:24 EDT 2006


my.properties file located in package com.company.product.unit

so full package path is com.company.product.unit.my.properties

code...

  | ClassLoader.getResourceAsStream("my.properties");
  | ClassLoader.getResourceAsStream("com/company/product/unit/my.properties");
  | 
I can't get the file to load in JBoss. I fell like an idiot, however, this code which works fine in a java app does not work in JBoss (neither line of code works). Both return null. I'm sure someone know how to do this. Please advise.

Thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967576#3967576

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967576



More information about the jboss-user mailing list