Click here to Skip to main content
16,017,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have been created a jar file which has to be executed thru command line. One xml file also added source package with log path settings. My question is how to set assembly execution path so that i have to get the xml. Currently i had embeded as

Java
FileInputStream fileIn = new FileInputStream(System.getProperty("user.dir") + "\\src\\ProjName\\Config.xml");


While giving the jar file and xml to third party, how do I handle this ?
Posted

1 solution

It is better to use relative path than absolute path.

Use the bellow statement,

FileInputStream fileIn = new FileInputStream("\\src\\ProjName\\Config.xml");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900