code: protected static String getClassName(String filename)
     {
  
        // end index is just before ".class"
        int endIndex = filename.length() - ".class".length();
  
        // extract relevant part of the path
        String relativePath = filename.substring(0, endIndex);
  
        // replace / by . to create FQCN
        return relativePath.replace('/', '.');
     }
docs: <p>
  Creates a FQCN from an {@link URL} representing a <code>.class</code> file.
  </p>
  
  @param url The path of the class file
  @return the FQCN of the class