List of usage examples for org.apache.commons.lang3 ArchUtils getProcessor
public static final Processor getProcessor()
From source file:io.vertx.config.vault.utils.VaultDownloader.java
private static URL getURL(String version) { StringBuilder url = new StringBuilder(); url.append("https://releases.hashicorp.com/vault/").append(version).append("/vault_").append(version) .append("_"); if (SystemUtils.IS_OS_MAC) { url.append("darwin_"); } else if (SystemUtils.IS_OS_LINUX) { url.append("linux_"); } else if (SystemUtils.IS_OS_WINDOWS) { url.append("windows_"); } else {// www. ja v a2s .com throw new IllegalStateException("Unsupported operating system"); } if (ArchUtils.getProcessor().is64Bit()) { url.append("amd64.zip"); } else { url.append("386.zip"); } System.out.println("Downloading " + url.toString()); try { return new URL(url.toString()); } catch (Exception e) { throw new RuntimeException(e); } }