public static String getJarVersionNumber() {
    Class clazz = SelendroidStandaloneDriver.class;
    String className = clazz.getSimpleName() + ".class";
    String classPath = clazz.getResource(className).toString();
    String version = "";

    if (!classPath.startsWith("jar")) {
      // Class not from JAR
      if(classPath.startsWith("file") && classPath.contains("target")) {
        try {
          version = getVersionFromPom(classPath.substring(5, classPath.lastIndexOf("target")));
        } catch (Exception e) {
          e.printStackTrace();
          return "";
        }
      } else return "dev";
    } else {
        try {
          version = getVersionFromManifest(classPath);
        } catch (IOException e){
          return "";
        }
    }
    return version;
  }
Loads resources as stream and the main reason for having the method is because it can be use
while testing and in production for loading files from within jar file.

@param resource The resource to load.
@return The input stream of the resource.
@throws SelendroidException if resource was not found.
selendroid-standalone/src/main/java/io/selendroid/standalone/builder/SelendroidServerBuilder.java