public static void addLibrary(File file) throws IOException {
        URL fileURL=file.toURI().toURL();
        List<String> string = new ArrayList<String>();

        JarFile jarFile=new JarFile(file);
        Enumeration<JarEntry> entries=jarFile.entries();
        while (entries.hasMoreElements()) {
            JarEntry entry=entries.nextElement();
            String name=entry.getName();
            if (name.endsWith(".class")) {
                name=name.substring(0,name.length() - 6);
                name=name.replace('/','.');
                string.add(name);
            }
        }
        jarFile.close();

        Iterator i = string.iterator();
        while (i.hasNext()){
            System.out.println(i.next());
        }
    }