I'm new to eclipse and facing a small problem with loading a file. Basically what i want to do is load an xml file present in the same src folder in a java file that is also in the same folder.
file structure is like this project > src > example.xml, program.java
I want to load example.xml in program.java but whatever i do it keeps on saying wrong path specified. My code is
File xml = new File("/Project/src/exmaple.xml");
But its not working at all, can anyone help please?
EDIT: Thanks for the quick responses guys i solved it with the help from @Exupery and have also answered my won question so that its helpful for others too!