public void loadPlayersJars(String folderName) {

        playersClasses = new HashMap<String, Class>();

        File folder = new File(folderName);

        if (folder.listFiles() == null) return;

        for (final File fileEntry : folder.listFiles()) {

            URLClassLoader child = null;
            try {
                child = new URLClassLoader(new URL[]{fileEntry.toURL()}, this.getClass().getClassLoader());
                String fileName = fileEntry.getName();
                String className = fileName.substring(0, fileName.length() - ".jar".length());
                Class classToLoad = Class.forName(className, true, child);
                playersClasses.put(className, classToLoad);

            } catch (MalformedURLException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            } catch (ClassNotFoundException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            }

        }

    }