Class JarRelocator


  • public final class JarRelocator
    extends Object
    Relocates classes and resources within a jar file.
    • Constructor Detail

      • JarRelocator

        public JarRelocator​(File input,
                            File output,
                            Collection<Relocation> relocations)
        Creates a new instance with the given settings.
        Parameters:
        input - the input jar file
        output - the output jar file
        relocations - the relocations
      • JarRelocator

        public JarRelocator​(File input,
                            File output,
                            Map<String,​String> relocations)
        Creates a new instance with the given settings.
        Parameters:
        input - the input jar file
        output - the output jar file
        relocations - the relocations
    • Method Detail

      • run

        public void run()
                 throws IOException
        Executes the relocation task
        Throws:
        IOException - if an exception is encountered whilst performing i/o with the input or output file