I need to run a Java File inside a Linux Environemnt .
As part of the code the Java file needs to load a XML File
Please tell me how can i provide the path of the XML File to the java file ?
Can i provide this way ? (Assuming that the java class file and the sample_config.xml are in the same folder ??
Util.load("/sample_config.xml");
Please let me know . Thank you very much .
If in the same folder change
"/sample_config.xml"to"sample_config.xml", as"/sample_config.xml"would look for the xml file in the root directory (/):EDIT: this would only work if
"sample_config.xml"was in the same folder as where the Java process was executing in. See the answer from Qwe.