public class MyApplication {
    private static final String className = "javafx.application.Application";

    public static void main(String[] args) {
        System.err.println("Check whether " + className +
                " is available (it should not be).");
        System.err.println("An exception message is expected.");
        try {
            Class<?> clazz = Class.forName(className);
            System.err.println("***ERROR: Found " + clazz);
            throw new AssertionError("Unexpected class found");
        } catch (ClassNotFoundException ex) {
            System.err.println("Got expected exception: " + ex);
        }
    }
}
