LibCheck.java :  » Portal » uPortal-3.1.2 » org » jasig » portal » tools » Java Open Source

Java Open Source » Portal » uPortal 3.1.2 
uPortal 3.1.2 » org » jasig » portal » tools » LibCheck.java
/**
 * Copyright (c) 2000-2009, Jasig, Inc.
 * See license distributed with this file and available online at
 * https://www.ja-sig.org/svn/jasig-parent/tags/rel-10/license-header.txt
 */
package org.jasig.portal.tools;

public class LibCheck {
    
    /**
     * Class that checks that JAXP is present in the JVM. This allows us to give a
     * useful error back to the user if we find JAXP missing instead of getting many of
     * class not found errors the user will see a message instructing them how to fix
     * the problem.
     */
    public LibCheck() {
        super();
    }
    
    public static void main(String[] args) {
        String importantClass = "javax.xml.xpath.XPathConstants";
        try {
            Class c = LibCheck.class.getClassLoader().loadClass(importantClass);
        } catch (ClassNotFoundException e) {
            System.err.println(e);
            System.err.println("The missing class is provided as part of JAXP.\n" +
                "Check that you have the JAXP jars installed in your JDK.\n" +
                "For more information see lib/jaxp/README.txt.");
            System.exit(1);
        }
        System.exit(0);
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.