• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/gettext-0.17/gettext-tools/examples/hello-java-qtjambi/m4/
1// Test for Java 1.5 or newer.
2import java.util.*;
3public class Test15 {
4  public static void main (String[] args) {
5    try {
6      foo();
7    } catch (Throwable e) {
8      System.exit(1);
9    }
10    // Check the JVM version is at least 1.5.
11    String version = System.getProperty("java.specification.version");
12    int i = 0;
13    while (i < version.length()
14           && (Character.isDigit(version.charAt(i)) || version.charAt(i)=='.'))
15      i++;
16    float fversion = Float.valueOf(version.substring(0,i));
17    if (!(fversion >= 1.5f)) System.exit(1);
18    // Check the VM is not GNU libgcj.
19    String vm = System.getProperty("java.vm.name");
20    if (vm.startsWith("GNU")) System.exit(1);
21    System.exit(0);
22  }
23  private static List<Integer> foo() {
24    return new ArrayList<Integer>();
25  }
26}
27