Loading properties files inside Operations classes
Posted: Fri Jul 17, 2009 3:29 pm
Hi,
I am attempting to load a properties file from inside an Operation class.
My operation is packaged inside a jar file 'acm.jar', the Operation I have loads the properties file as follows:
I have tried deplying the properties file in two ways:
1. In the root of the acm.jar file
2. Inside the ACM framework folder, and then explicity adding the properties file to the classpath of the framework inside the 'Document Type Associations->Classpath' area.
Neither of these work, I just get a null pointer when loading the file.
Any ideas?
Simon.
I am attempting to load a properties file from inside an Operation class.
My operation is packaged inside a jar file 'acm.jar', the Operation I have loads the properties file as follows:
Code: Select all
Properties properties = new Properties(); properties.load(ClassLoader.getSystemResourceAsStream("CaseLinkOperation.properties"));
LCR_TOOL_USERNAME = (String)properties.get(LCR_TOOL_USERNAME_KEY);
LCR_TOOL_PASSWORD = (String)properties.get(LCR_TOOL_PASSWORD_KEY);
1. In the root of the acm.jar file
2. Inside the ACM framework folder, and then explicity adding the properties file to the classpath of the framework inside the 'Document Type Associations->Classpath' area.
Neither of these work, I just get a null pointer when loading the file.
Any ideas?
Simon.