1

I am using IDEA 11 and need to run a class with a main method but with additional classpath entries - both xml files and jars. I have tried adding them as Global Libraries, as additional source content roots, and as regular additional libraries, however none of these seem to pick up the xml files and so when I execute the run config I get FileNotFoundExceptions.

Please can anyone suggest something else as the printed classpath in the console never contains any of my custom definitions.

If I can't solve this I may have to resort to learning Eclipse just to get stuff done. This is making me a little crazy. I have tried all the suggestions I could find on SO but no luck so far.

UmNyobe
  • 22,539
  • 9
  • 61
  • 90
SilentICE
  • 700
  • 8
  • 25

1 Answers1

0

Did you check the answers to the similar questions?

If it still doesn't work, please share a sample project via Dropbox.

Community
  • 1
  • 1
CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • Thanks I had tried all of those but I still get the FileNotFoundException. Uploading a sample project is not easy as this is an internal project and I don't have permission to make any of it public so would have to try and replicate the issue in a new dummy project. – SilentICE Feb 06 '12 at 14:11
  • I have altered the project so that the external xml files are now under a src/main/config directory and set that directory as source (as per first link you provided) and still encounter the error. I have even tried making the working directory of the run config the /config dir and get the same error. I have checked the compile patterns and ?*.xml is present. – SilentICE Feb 06 '12 at 14:14
  • Can you share the code that loads the XML? Where exactly do the XML files appear in the `out` directory after Make? – CrazyCoder Feb 06 '12 at 14:18
  • Hmm I think that might be it, I wasn't doing a Make before the configuration executed (box not ticked) so it wasn't copying the files over. Now I've done that and set the right working directory Ive a bunch of different errors (more to do with code than classpath!) so tenative result :) – SilentICE Feb 07 '12 at 11:29