I am creating an application (hive udf) and for that I am creating an fat jar with all the dependencies. As this is going to be distributed over multiple nodes I need to pack my property files in jar as well.
Problem One of the function I am calling from another jar needs a parameter, a property file path. I have packed this property file inside jar. and passing just the name. However, it's complaining that file not found.
Code:
c = new ABC("classification.props");
Function inside ABC class that read the property file
public static Properties getProperties(String propFile) {
Properties props = new Properties();
try {
props.load(new FileInputStream(propFile));
return props;
} catch (IOException var3) {
var3.printStackTrace();
}
}
This ABC is coming from another jar. however I am creating a fat jar so shouldn't matter. classification.props is in the root folder of application.