@@ -19,8 +19,17 @@ public static String getLucene() {
1919 return lucene ;
2020 }
2121
22- public static String getBundledJdk () {
23- return bundledJdk ;
22+ public static String getBundledJdk (final String platform ) {
23+ switch (platform ) {
24+ case "darwin" :
25+ return bundledJdkDarwin ;
26+ case "linux" :
27+ return bundledJdkLinux ;
28+ case "windows" :
29+ return bundledJdkWindows ;
30+ default :
31+ throw new IllegalArgumentException ("unknown platform [" + platform + "]" );
32+ }
2433 }
2534
2635 public static String getBundledJdkVendor () {
@@ -33,7 +42,9 @@ public static Map<String, String> getVersions() {
3342
3443 private static final String elasticsearch ;
3544 private static final String lucene ;
36- private static final String bundledJdk ;
45+ private static final String bundledJdkDarwin ;
46+ private static final String bundledJdkLinux ;
47+ private static final String bundledJdkWindows ;
3748 private static final String bundledJdkVendor ;
3849 private static final Map <String , String > versions = new HashMap <String , String >();
3950
@@ -42,7 +53,10 @@ public static Map<String, String> getVersions() {
4253 elasticsearch = props .getProperty ("elasticsearch" );
4354 lucene = props .getProperty ("lucene" );
4455 bundledJdkVendor = props .getProperty ("bundled_jdk_vendor" );
45- bundledJdk = props .getProperty ("bundled_jdk" );
56+ final String bundledJdk = props .getProperty ("bundled_jdk" );
57+ bundledJdkDarwin = props .getProperty ("bundled_jdk_darwin" , bundledJdk );
58+ bundledJdkLinux = props .getProperty ("bundled_jdk_linux" , bundledJdk );
59+ bundledJdkWindows = props .getProperty ("bundled_jdk_windows" , bundledJdk );
4660
4761 for (String property : props .stringPropertyNames ()) {
4862 versions .put (property , props .getProperty (property ));
0 commit comments