public static void loadJAR ( String jar ) throws IOException , SecurityException , IllegalArgumentException , NoSuchMethodException , IllegalAccessException , InvocationTargetException { if ( ! jar . toLowerCase ( ) . endsWith ( ".jar" ) ) { throw new IllegalArgumentException ( "File specified did not end with .jar" ) ; } File file = new File ( jar ) ; if ( ! file . exists ( ) ) { throw new FileNotFoundException ( jar ) ; } addFile ( file ) ; }
Attempts to load the given jar into the class path