0

I'm on a new branch of a git project on which I've made my own config file called MY_NAME.conf which is located in

Users/myname/IdeasProject/projectName/src/main/resources/config.

However, I'm having some issues getting my branch to run. So, just to make sure things are smooth I set up a new environment and I've cloned into the master. This is all done at

Users/myproject

However, now when I try to run the project I get a message

java.io.IOException: resource not found on classpath: config/MY_NAME.conf

Why is it looking for this file at all? And even if it is, why is it not finding MY_NAME.conf?

LivingRobot
  • 883
  • 2
  • 18
  • 34

2 Answers2

0

I think the issue is that classpath doesnt include conf folder.

You can modify/set class path with: set CLASSPATH=path1;path2

Moriarty
  • 515
  • 3
  • 17
  • I tried resetting the class path, but it still doesn't seem to do it. I'm not using Play... – LivingRobot Aug 02 '17 at 18:42
  • But, the issue I don't understand is why this newly cloned file (cloned from master which doesn't have this conf file) is even looking for the conf file which is on the other branch. It shouldn't even know of its existence. – LivingRobot Aug 02 '17 at 18:43
  • Ok so master version doesn't have conf file. Just to make sure we are on same page, is this the correct flow?- 1. Cloned master to local machine. 2. Made new branch B. 3. Added conf file to B. Now master is looking for the conf file that was added to B? – Moriarty Aug 02 '17 at 19:33
  • Yeah. Exactly. No clue why it's even looking for it. – LivingRobot Aug 02 '17 at 19:58
  • That is odd, this SO post may help solve your problem https://stackoverflow.com/questions/16408300/what-are-the-differences-between-local-branch-local-tracking-branch-remote-bra – Moriarty Aug 02 '17 at 20:49
0

Consider setting the classpath through one of these recommended techniques. Without knowing the specifics of your runtime environment, there should be a mechanism provided to include src/main/resources in your java classpath.