Originally posted by: paul.brett
Here I have some Java code:
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class Test1 {
public Test1() {
}
public String getConfigProp(String propitem) {
Properties prop = new Properties();
InputStream input = null;
try {
input = new FileInputStream("config.properties");
// load a properties file
prop.load(input);
} catch (IOException ex) {
ex.printStackTrace();
} finally {
if (input != null) {
try {
input.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
String retprop = prop.getProperty(propitem);
return retprop;
}
}
...and my map call
=VALID(JEXIT("Test1", "getConfigProp","abc"), FAIL(LASTERRORMSG()))
...which in turn loads from the config.properties file stored in the same location as the map.
Without a path hard-coded into the java code, this is the default behaviour.
Does this answer your question?
Thank-you.
Paul.
Follow me on Twitter
#DataExchange#IBM-Websphere-Transformation-Extender#IBMSterlingTransformationExtender