static String [ ] searchJarFSForClasses ( URL url ) throws IOException { try { try { FileSystems . newFileSystem ( url . toURI ( ) , new HashMap <> ( ) ) ; } catch ( FileSystemAlreadyExistsException e ) { /* ignore */ } Path path = FileSystems . getFileSystem ( url . toURI ( ) ) . getPath ( "/" ) ; return Files . walk ( path ) . map ( Path :: toString ) . filter ( BshClassPath :: isClassFileName ) . map ( BshClassPath :: canonicalizeClassName ) . toArray ( String [ ] :: new ) ; } catch ( URISyntaxException e ) { /* ignore */ } return new String [ 0 ] ; }
Search jar file system for classes .