code: public static String getClassNameForClassFile(String rootDir, String path) {
          path = path.replace("/", ".");
          path = path.replace('\\', '.');
          path = path.substring(0, path.length() - CLASS_EXTENSION.length());
          if (rootDir != null) {
              path = path.substring(rootDir.length());
          }
          return path;
      }
docs: Returns the class name for a compiled class file
  
  @param path The path to check
  @return The class name or null if it doesn't exist