Class JarUtils

java.lang.Object
org.drools.util.JarUtils

public class JarUtils extends Object
Utility to access jar files
  • Method Details

    • normalizeSpringBootResourceUrlPath

      public static String normalizeSpringBootResourceUrlPath(String resourceUrlPath)
      Spring Boot executable jar contains path "BOOT-INF/classes/org/example/MyClass.class" in the jar file. However, when resource urls are acquired by spring boot classloader's getResources(), "!" is added to the path prefix as a "nest" separator, resulting in "BOOT-INF/classes!/org/example/MyClass.class". This method removes the "!" from the path to make it consistent with the actual path in the jar file.
      Parameters:
      resourceUrlPath - resource url path
      Returns:
      normalized resource url path