0

I have created a jar file of my project through eclipse by selected Runnable Jar File in eclipse. When I run this jar file in my cmd it works prperly but when i take it on other system/pc it don't work properly i.e it does not find the .properties files. So,those operations which require .properties are not performed through the cmd and rest of the operations are working well. What do I need to do in this case?

Code for Reference:

try {
    // Loads the constants.properties file
    InputStream constantPropFile = ClassLoader.class.getResourceAsStream("/constants.properties");
    constantProp.load(constantPropFile);
}catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();    
}
codebot
  • 2,540
  • 3
  • 38
  • 89
user3678383
  • 105
  • 11

0 Answers0