Java process - unable to unzip zip file

后端 未结 2 1949
梦毁少年i
梦毁少年i 2021-01-28 21:07

I am trying to unzip some zip file, it has about 65 megs. Code snippets below:

This method actually unzips a file:

public synchronized void execute(Path          


        
2条回答
  •  南笙
    南笙 (楼主)
    2021-01-28 21:17

    I think problem is because of timeout constraint.

    You can try below code to execute process

    Runtime runtime = Runtime.getRuntime();
    Process process = runtime.exec(commandLine);
    

    I think it will work.

提交回复
热议问题