@@ -19,8 +19,17 @@ public static String getLucene() {
19
19
return lucene ;
20
20
}
21
21
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
+ }
24
33
}
25
34
26
35
public static String getBundledJdkVendor () {
@@ -33,7 +42,9 @@ public static Map<String, String> getVersions() {
33
42
34
43
private static final String elasticsearch ;
35
44
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 ;
37
48
private static final String bundledJdkVendor ;
38
49
private static final Map <String , String > versions = new HashMap <String , String >();
39
50
@@ -42,7 +53,10 @@ public static Map<String, String> getVersions() {
42
53
elasticsearch = props .getProperty ("elasticsearch" );
43
54
lucene = props .getProperty ("lucene" );
44
55
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 );
46
60
47
61
for (String property : props .stringPropertyNames ()) {
48
62
versions .put (property , props .getProperty (property ));
0 commit comments