@Override
  public ImmutableList<String> computeEntrypoint(List<String> jvmFlags) throws IOException {
    try (JarFile jarFile = new JarFile(jarPath.toFile())) {
      String mainClass =
          jarFile.getManifest().getMainAttributes().getValue(Attributes.Name.MAIN_CLASS);
      if (mainClass == null) {
        throw new IllegalArgumentException(
            "`Main-Class:` attribute for an application main class not defined in the input JAR's "
                + "manifest (`META-INF/MANIFEST.MF` in the JAR).");
      }
      ImmutableList.Builder<String> entrypoint = ImmutableList.builder();
      entrypoint.add("java");
      entrypoint.addAll(jvmFlags);
      entrypoint.add("-jar");
      entrypoint.add(JarLayers.APP_ROOT + "/" + jarPath.getFileName().toString());
      return entrypoint.build();
    }
  }
Constructor for {@link StandardPackagedProcessor}.

@param jarPath path to jar file
@param jarJavaVersion jar java version
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/jar/StandardPackagedProcessor.java