从.Jar

时间:2017-01-15 23:49:46

标签: java eclipse jar io apache-poi

我有一些代码用Apache-POI对一些excel文件进​​行一系列操作,并将生成的文件保存到两个新的excel文件中。我想把它们编译成一个罐子,这样我的老板也可以运行它,但是当我这样做时,它不再写入输出文件,无论它们是否存在。

我从eclipse火星导出它,路径是相对的,执行文件保存的代码是

FileOutputStream fileOut = new FileOutputStream(aggregated_path);
aggregateSheet.write(fileOut);
fileOut.close();
fileOut = new FileOutputStream(report_path);
report.write(fileOut);
fileOut.close();

0 个答案:

没有答案