I am facing one issue which is related to unzipping .xsn file from java code. I am stuck up with and looking for some resolution.
Guys can you please help me out from this problem?
I have tried with java traditional code to ZipFile class.
I am facing one issue which is related to unzipping .xsn file from java code. I am stuck up with and looking for some resolution.
Guys can you please help me out from this problem?
I have tried with java traditional code to ZipFile class.
Below is the answer for my requirement which might be useful to you.
String command = "expand \"C:\\Users\\amishra\\Desktop\\backup\\BOM.xsn\" \"C:\\Users\\amishra\\Desktop\\backup\" -F:*";
Process process = Runtime.getRuntime().exec(command);
BufferedReader stdInput = new BufferedReader(new InputStreamReader(process.getInputStream()));
BufferedReader stdError = new BufferedReader(new InputStreamReader(process.getErrorStream()));
String s;
while ((s = stdInput.readLine()) != null) {
System.out.println(s);
}
// Read command errors
System.out.println("Standard error: ");
while ((s = stdError.readLine()) != null) {
System.out.println(s);
}
The XSN file is really a CAB file. Try checking out the Microsoft CAB SDK here