java - File Not found exception on different Machine -
i trying access file opt/app/db/vat/form_data_30.xls. works fine on machine shows exception on other machine on application installed. here code
string filename="opt/app/db/vat/form_dvat_30.xls"; file selectedfile=new file(filename);
physically .xls file exist inside opt/app/db/vat directory.and users have permission of read write well. mine runnable jar app.jar stored @ /opt/app/app.jar
if use string filename="opt/app/db/vat/form_dvat_30.xls";
relative execution folder.
for example if programe executed /home/user/
file should in /home/user/opt/app/db/vat/form_dvat_30.xls
if want access /opt/app/db/vat/form_dvat_30.xls
use string filename="/opt/app/db/vat/form_dvat_30.xls";
Comments
Post a Comment