private void find(String packageName, boolean recursive, Set<Class<?>> classes) {
        // Translate the package name into an absolute path
        String name = packageName;
        if (!name.startsWith("/")) {
            name = "/" + name;
        }
        name = name.replace('.', '/');

        // Get a File object for the package
        packageName = packageName + ".";
        URI uri;
        FileSystem fileSystem = null;
        try {
            uri = this.getClass().getResource(name).toURI();
        } catch (URISyntaxException e) {
            throw new RuntimeException("Failed to load demo classes.", e);
        }

        // Special case if we are running from inside a JAR
        if ("jar".equalsIgnoreCase(uri.getScheme())) {
            try {
                fileSystem = FileSystems.newFileSystem(uri, Collections.emptyMap());
            } catch (IOException e) {
                throw new RuntimeException("Failed to load demo classes from JAR.", e);
            }
        }

        try {
            Path directory = Paths.get(uri);
            logger.log(
                Level.FINE,
                "Searching for Demo classes in \"{0}\".",
                directory.getFileName().toString()
            );
            addAllFilesInDirectory(directory, classes, packageName, recursive);
        } catch (Exception e) {
            logger.logp(
                Level.SEVERE,
                this.getClass().toString(),
                "find(pckgname, recursive, classes)",
                "Exception",
                e
            );
        } finally {
            if (fileSystem != null) {
                try {
                    fileSystem.close();
                } catch (IOException e) {
                    logger.log(Level.WARNING, "Failed to close JAR.", e);
                }
            }
        }
    }
@param classes
           vector that receives the found classes
@return classes vector, list of all the classes in a given package (must
        be found in classpath).
jme3-examples/src/main/java/jme3test/TestChooser.java