I am running a project using $ activator "run 8081". In the application, I try to read an xml file using the following command:
resource = ClassLoader.getSystemClassLoader().getResource(filePath)
The problem is that the resource is null. After debuging, I noticed that the running ClassLoader.getSystemClassLoader().getURLs() returns a single jar file. Which means that the above code is trying to load filePath from inside this jar file.
Any ideas on what I can do to fix this problem and load the filePath? Note that I have to keep the ClassLoader.getSystemClassLoader().getResource(filePath) as is, but I can change the value of filePath and environment variables, etc.
EDIT:
How do I set the classpath for activator when I run it in dev mode: $ activator "run 8081"?
Answering this can help answer my original question.