JSONObject root = new JSONObject(tokener); String version = root.getString("version"); latestVersion = parseGatewayVersion(version);
public UpdateCheckService() { ProductInfo productInfo = getProductInfoInstance(); productName = productInfo.getTitle().replaceAll("\\s+", ""); try { String version = productInfo.getMajor() +"."+ productInfo.getMinor() +"."+ productInfo.getPatch(); currentVersion = parseGatewayVersion(version); } catch (Exception e) { throw new RuntimeException("Could not locate a product version associated with the jars on the classpath", e); } final String productEdition = productInfo.getEdition().replaceAll("\\s+", ""); versionServiceUrl = (productEdition.toLowerCase().contains("enterprise")) ? "https://version.kaazing.com" : "https://version.kaazing.org"; }