Class JarLinker

java.lang.Object
eu.bandm.tools.util3.JarLinker

public class JarLinker extends Object
Collect only those run-time classes which are reachable from one or more main classes, to create a compact binary distribution.
ATTENTION FIXME no warning if a class is reached but not written out.
  • Field Details

  • Constructor Details

    • JarLinker

      public JarLinker()
  • Method Details

    • debugging

      boolean debugging()
    • setVerbosity

      public void setVerbosity(int verbosity)
    • setSeal

      public void setSeal(boolean seal)
    • addExcludedPackage

      public void addExcludedPackage(String name)
    • addExcludedSubtree

      public void addExcludedSubtree(String prefix)
    • linkApplication

      public void linkApplication(MessageReceiver<SimpleMessage<String>> msg, String[] mainClassNames, File targetJarFile, File manifestFile, File[] libraries, Multimap<File,String> additionals) throws IOException
      Method for packing a binary distribution into a jar file.
      Parameters:
      mainClassNames - an array with the name of the main classes
      targetJarFile - the file object into which the jar file shall be generated
      libraries - jar files or directories of class files from which class files shall be included in the binary distribution.
      additionals - resources to be copied additionally to the reachable classes. FIXME MORE DOKU
      Throws:
      IOException
    • main

      public static void main(String[] args) throws IOException
      Command line tool for packing a binary distribution into a jar file, controlled by command line options, as described in JarLinkerOptions..
      Throws:
      IOException