public class main { public static void main(String[] args) throws java.io.IOException { // The path to the working directory. String dir = "/Desktop/"; // Initialize an instance of the Archive class with a source WIM file. try (FileInputStream fs = new FileInputStream(dir + "corpus.wim")) { // Create an instance of the WimArchive class and initialize it with the input stream. try (WimArchive archive = new WimArchive(fs)) { // Invoke the extractToDirectory method to extract WIM file into a folder. archive.getImages().get(0).extractToDirectory(dir + "DecompressWim_out"); } } catch (CryptographicException e) { e.printStackTrace(); } } }