static String [ ] searchJrtFSForClasses ( URL url ) throws IOException { try { Path path = FileSystems . getFileSystem ( new URI ( "jrt:/" ) ) . getPath ( "modules" , url . 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 jrt file system for module classes .