Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/arranger/jarl/util/JDKUtil.java


1   package com.arranger.jarl.util;
2   
3   import com.sun.tools.javac.Main;
4   
5   /**
6    * JDKUtil verifies the version of the JDK
7    */
8   public class JDKUtil {
9   
10      public static void checkJDKVersion() {
11          try {
12              Class.forName(CharSequence.class.getName());
13              Class.forName(Main.class.getName());
14          } catch (ClassNotFoundException e) {
15              throw new IllegalStateException("Please ensure that you are using JDK 1.4 or higher." +
16                      "  Current version is: " + System.getProperty("java.version"));
17          }
18      }
19  }