Prevent running on JDK7 - the WebView implementation on JDK7 is not good enough for CSS animations
authorJaroslav Tulach <jtulach@netbeans.org>
Tue, 13 Aug 2013 21:19:31 +0200
changeset 453f85884ca049
parent 44 e3305312184c
child 46 009537e6ce80
Prevent running on JDK7 - the WebView implementation on JDK7 is not good enough for CSS animations
spinningcube/src/main/java/org/apidesign/demo/spinningcube/Main.java
     1.1 --- a/spinningcube/src/main/java/org/apidesign/demo/spinningcube/Main.java	Tue Aug 13 21:11:28 2013 +0200
     1.2 +++ b/spinningcube/src/main/java/org/apidesign/demo/spinningcube/Main.java	Tue Aug 13 21:19:31 2013 +0200
     1.3 @@ -36,6 +36,11 @@
     1.4      
     1.5      /** Launches the browser */
     1.6      public static void main(String... args) throws Exception {
     1.7 +        try {
     1.8 +            Class.forName("java.lang.FunctionalInterface");
     1.9 +        } catch (ClassNotFoundException classNotFoundException) {
    1.10 +            throw new IllegalStateException("This application does not run on JDK7, use at least JDK8");
    1.11 +        }
    1.12          BrowserBuilder.newBrowser().
    1.13              loadPage("pages/index.html").
    1.14              loadClass(Main.class).