Config archive-directory in xml file to specify the path of the file generated.
<archive-directory>E:/archive/sample</archive-directory>
In Java:
if(!directory.endsWith("/")||!directory.endsWith("\\")){
directory=directory+File.separator;
}
Java API write:
File.separator returns '\\' in MS windows, '/' in Unix
java.io.IOException The system cannot find the path specified' will be encountered.(E:/archive/sample\***)
Resolution:
<archive-directory>E:\\archive\\sample</archive-directory>
or
<archive-directory>E:\archive\sample</archive-directory>
<archive-directory>E:/archive/sample</archive-directory>
In Java:
if(!directory.endsWith("/")||!directory.endsWith("\\")){
directory=directory+File.separator;
}
Java API write:
File.separator returns '\\' in MS windows, '/' in Unix
java.io.IOException The system cannot find the path specified' will be encountered.(E:/archive/sample\***)
Resolution:
<archive-directory>E:\\archive\\sample</archive-directory>
or
<archive-directory>E:\archive\sample</archive-directory>