FileDocCategorySizeDatePackage
TestFor1_1.javaAPI DocExample471Sun Feb 08 21:34:02 GMT 2004None

TestFor1_1.java

/** Check *by features* for JDK >= 1.1 */
public class TestFor1_1 {
	public static void main(String[] args) {
		try {
			Class.forName("java.lang.reflect.Constructor");
			System.out.println("OK, pal, this JVM is 1.1 or later");
		} catch (ClassNotFoundException e) {
			String failure = 
				"Sorry, but this program needs a Java\n" +
				"Runtime based on Java JDK 1.1 or later";
			System.err.println(failure);
			throw new IllegalArgumentException(failure);
		}
	}
}