Skip to content

Instantly share code, notes, and snippets.

@froop
Created January 13, 2012 03:24
Show Gist options
  • Save froop/1604426 to your computer and use it in GitHub Desktop.
Save froop/1604426 to your computer and use it in GitHub Desktop.
[Java][Windows] 7-Zipで自己解凍書庫ファイル作成
File execute7Zip(String workDir, String baseName, String wildCard) {
String path = "C:\\Program Files\\7-Zip\\7z.exe";
WindowsCommandUtils.executeCommand(
new ProcessBuilder(path, "a", "-sfx7z.sfx", baseName, wildCard)
.directory(new File(workDir)));
return new File(workDir, baseName + ".exe");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment