I have two project - foo and bar. Foo is the main project and it depends on bar project. Foo is also the project that holds the configuration file (conf.xml). These project are packaged as separate jars. Conf.xml is included in foo.jar and the main class accesses it like this:
MyApp.class.getClassLoader().getResource("conf.xml");
To run these i type on command line:
java -cp "*" com.example.MyApp
Everything works fine.
My question is that sometimes i want to change the conf.xml without rebuilding the project. So i would like to take conf.xml out of the jar so i can edit it myself. The problem then is that the class inside the jar cant find the conf.xml anymore. Can this be fixed without changing the code in my classes?