A path starting with a slash indicates an absolute path, so under windows that would be something like a drive called PMIS
, under Linux a base folder with that name in your mounted filesystem.
In fact, you want to open a file relative to your working directory, so you've got to start with ./PMIS/src/config/PMIS_Request_Template.xml
(with the initial dot indicating the current working directory) or with PMIS/src/config/PMIS_Request_Template.xml
(without the leading slash).
Apart from that, you want to verify that your current working directory is even what you expect it to be (i.e. the eclipse folder). You can find it out this way, for example. Adjust your path accordingly, or better, make the path flexible and allow it to be handed over from the args
, so the person starting this program can specify the relative or absolute location.
Side node as you use maven: If you want to have this file statically around, you should put it into a resources
folder at the same level as the src
folder because it doesn't contain Java source code. Use the maven resource loading logic then - check this thread out, for example.
And, well, the standard folder structure for Maven is a bit different. So if you haven't modified these settings manually, you should fix that: move src
to main/src
and resource files into main/resources
, or you'll get into trouble later.