Skip to content

Commit

Permalink
Added the vendor and the vendorVersion of the Java:
Browse files Browse the repository at this point in the history
Having the vendor and vendor version information of Java
is useful in case of support and bug fixes of the specific
vendor related Java version.

(cherry picked from commit 9820480)
  • Loading branch information
amusarra committed Dec 6, 2024
1 parent 85387f9 commit ebe80d5
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,20 @@ public Map<String, Object> data() {
//TODO: should we add more information like 'java.runtime.*' and 'java.vm.*' ?
Map<String, Object> result = new LinkedHashMap<>();
result.put("version", getVersion());
result.put("vendor", getVendor());
result.put("vendorVersion", getVendorVersion());
return result;
}

static String getVersion() {
return System.getProperty("java.version");
}

static String getVendor() {
return System.getProperty("java.vendor");
}

static String getVendorVersion() {
return System.getProperty("java.vendor.version");
}
}

0 comments on commit ebe80d5

Please sign in to comment.