Class CreateRuntimeImage


  • public class CreateRuntimeImage
    extends java.lang.Object
    Creates a modular runtime image for the given modules and module path, via jlink.
    • Constructor Summary

      Constructors 
      Constructor Description
      CreateRuntimeImage​(java.util.Set<java.nio.file.Path> modulePath, java.util.List<java.lang.String> modules, JarInclusionPolicy jarInclusionPolicy, java.util.Set<java.nio.file.Path> dependencies, java.nio.file.Path projectJar, java.lang.String launcherName, java.lang.String launcherModule, java.nio.file.Path outputDirectory, java.lang.Integer compression, boolean stripDebug, boolean ignoreSigningInformation, java.util.List<java.lang.String> excludeResourcesPatterns, Log log, boolean noHeaderFiles, boolean noManPages, boolean bindServices)  
    • Field Detail

      • DEPENDENCIES_DIRECTORY

        private static final java.lang.String DEPENDENCIES_DIRECTORY
        See Also:
        Constant Field Values
      • modulePath

        private final java.util.Set<java.nio.file.Path> modulePath
      • modules

        private final java.util.List<java.lang.String> modules
      • dependencies

        private final java.util.Set<java.nio.file.Path> dependencies
      • projectJar

        private final java.nio.file.Path projectJar
      • outputDirectory

        private final java.nio.file.Path outputDirectory
      • ignoreSigningInformation

        private boolean ignoreSigningInformation
      • launcher

        private final java.lang.String launcher
      • log

        private final Log log
      • compression

        private final java.lang.Integer compression
      • stripDebug

        private final boolean stripDebug
      • noHeaderFiles

        private final boolean noHeaderFiles
      • noManPages

        private final boolean noManPages
      • excludeResourcesPatterns

        private final java.util.List<java.lang.String> excludeResourcesPatterns
      • bindServices

        private final boolean bindServices
    • Constructor Detail

      • CreateRuntimeImage

        public CreateRuntimeImage​(java.util.Set<java.nio.file.Path> modulePath,
                                  java.util.List<java.lang.String> modules,
                                  JarInclusionPolicy jarInclusionPolicy,
                                  java.util.Set<java.nio.file.Path> dependencies,
                                  java.nio.file.Path projectJar,
                                  java.lang.String launcherName,
                                  java.lang.String launcherModule,
                                  java.nio.file.Path outputDirectory,
                                  java.lang.Integer compression,
                                  boolean stripDebug,
                                  boolean ignoreSigningInformation,
                                  java.util.List<java.lang.String> excludeResourcesPatterns,
                                  Log log,
                                  boolean noHeaderFiles,
                                  boolean noManPages,
                                  boolean bindServices)
    • Method Detail

      • getModules

        private static java.util.List<java.lang.String> getModules​(java.util.List<java.lang.String> modules)
      • run

        public void run()
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • deleteImageFolder

        private void deleteImageFolder()
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • copyJars

        private void copyJars()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • copyAppJar

        private void copyAppJar​(java.nio.file.Path jarDirectory)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • copyDependencyJars

        private void copyDependencyJars​(java.nio.file.Path jarDirectory)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • runJlink

        private void runJlink()
                       throws java.lang.AssertionError
        Throws:
        java.lang.AssertionError