0
Hello, I’m using a DOS file to unzip files. zip, is UNZIP.EXE itself (DOS executable) I am mounting the code as follows:
Desktop.getDesktop().open(new File("e:\\unzip.exe teste.zip" ));
It does not work at all, it gives an error saying that ZIP file has not been found, I have tested it this way, and also it did not work:
ProcessBuilder p = new ProcessBuilder();
p.command("e:\\unzip.exe", "e:\\teste.zip");
p.start();
What am I doing wrong? Basically I need to run the unzip.exe command with the ZIP file name in sequence, that’s all.
I appreciate any help! Thank you!
did not work, he executed more simply does nothing and nor the error.
– user7605
@user7605 if you give a
getInputStream()
he shows nothing?– Maicon Carraro
how can I do it ? if you can pass me the command, I started in java a short time, I thank you!
– user7605
After the
p.start();
you can catch the inputStream with thep.getInputStream()
, to read it can use that function here.– Maicon Carraro
@user7605 take a look /\
– Maicon Carraro
I’m testing...
– user7605
@Maiicon Carraro, he won’t let me use p.getInputStream();, only p.getclass();
– user7605
really didn’t work out here!
– user7605