I need to save my XML file in the same location where my Java file is present and call and use the XML when java file is executed. Is there any way through which this can be achieved?
Following is my code:
File fXmlFile = new File("C:\testing eclipsefolder/workspace/java1`/bin/diliya123/v1.xml");
Here I need to specify the file path of my XML. But I don't want to give that path, it should be such that when i give my jar file to others it shouldn't change its path should be constant every time.
When I try to run the same script using the above code I get the following type of error:
[TestNG] Running:
C:\Documents and Settings\saalam\Local Settings\Temp\testng-eclipse-1407458964\testng-customsuite.xml
Guys please suggest me someways through which it is possible.