|
@@ -89,6 +89,11 @@ public final class JavaEnvUtils { |
|
|
/** Number Version constant for Java 1.6 */ |
|
|
/** Number Version constant for Java 1.6 */ |
|
|
public static final int VERSION_1_6 = 16; |
|
|
public static final int VERSION_1_6 = 16; |
|
|
|
|
|
|
|
|
|
|
|
/** Version constant for Java 1.7 */ |
|
|
|
|
|
public static final String JAVA_1_7 = "1.7"; |
|
|
|
|
|
/** Number Version constant for Java 1.7 */ |
|
|
|
|
|
public static final int VERSION_1_7 = 17; |
|
|
|
|
|
|
|
|
/** Whether this is the Kaffe VM */ |
|
|
/** Whether this is the Kaffe VM */ |
|
|
private static boolean kaffeDetected; |
|
|
private static boolean kaffeDetected; |
|
|
/** Whether this is the GNU VM (gcj/gij) */ |
|
|
/** Whether this is the GNU VM (gcj/gij) */ |
|
@@ -132,6 +137,9 @@ public final class JavaEnvUtils { |
|
|
Class.forName("java.util.ServiceLoader"); |
|
|
Class.forName("java.util.ServiceLoader"); |
|
|
javaVersion = JAVA_1_6; |
|
|
javaVersion = JAVA_1_6; |
|
|
javaVersionNumber++; |
|
|
javaVersionNumber++; |
|
|
|
|
|
Class.forName("java.nio.file.FileSystem"); |
|
|
|
|
|
javaVersion = JAVA_1_7; |
|
|
|
|
|
javaVersionNumber++; |
|
|
} catch (Throwable t) { |
|
|
} catch (Throwable t) { |
|
|
// swallow as we've hit the max class version that |
|
|
// swallow as we've hit the max class version that |
|
|
// we have |
|
|
// we have |
|
@@ -362,6 +370,7 @@ public final class JavaEnvUtils { |
|
|
private static void buildJrePackages() { |
|
|
private static void buildJrePackages() { |
|
|
jrePackages = new Vector(); |
|
|
jrePackages = new Vector(); |
|
|
switch(javaVersionNumber) { |
|
|
switch(javaVersionNumber) { |
|
|
|
|
|
case VERSION_1_7: |
|
|
case VERSION_1_6: |
|
|
case VERSION_1_6: |
|
|
case VERSION_1_5: |
|
|
case VERSION_1_5: |
|
|
//In Java1.5, the apache stuff moved. |
|
|
//In Java1.5, the apache stuff moved. |
|
@@ -412,6 +421,7 @@ public final class JavaEnvUtils { |
|
|
Vector tests = new Vector(); |
|
|
Vector tests = new Vector(); |
|
|
tests.addElement("java.lang.Object"); |
|
|
tests.addElement("java.lang.Object"); |
|
|
switch(javaVersionNumber) { |
|
|
switch(javaVersionNumber) { |
|
|
|
|
|
case VERSION_1_7: |
|
|
case VERSION_1_6: |
|
|
case VERSION_1_6: |
|
|
case VERSION_1_5: |
|
|
case VERSION_1_5: |
|
|
tests.addElement( |
|
|
tests.addElement( |
|
|