private Optional<String> readRunningVersionFromManifest() throws IOException {
    Enumeration<URL> resources = getClass().getClassLoader().getResources("META-INF/MANIFEST.MF");
    while (resources.hasMoreElements()) {
      URL url = resources.nextElement();
        try (InputStream inputStream = url.openStream()) {
          Manifest manifest = new Manifest(inputStream);
          String implementationTitle = manifest.getMainAttributes().getValue(IMPLEMENTATION_TITLE);
          if(implementationTitle != null && implementationTitle.equals("OtrosLogViewer-app")) {
            String result = manifest.getMainAttributes().getValue(IMPLEMENTATION_VERSION);
            LOGGER.debug("Running version is " + result);
            return Optional.of(result);
          }
        }
    }
    return Optional.empty();
  }
Check version of running application. Version is read from /META-INF/MANIFEST.MF file

@return currently running version
@throws IOException
olv-core/src/main/java/pl/otros/logview/updater/VersionUtil.java