Supported attributes:
destFile
classpath
classpathref
modulepath
modulepathref
commandpath
commandpathref
headerpath
headerpathref
configpath
configpathref
legalpath
legalpathref
nativelibpath
nativelibpathref
manpath
manpathref
version
mainclass
platform
jmod describe $JDK_HOME/jmods/java.base.jmod | grep -i platform.
hashModulesPattern
resolveByDefault
moduleWarnings
deprecated
leaving
incubating
Supported nested elements:
<classpath>
<modulepath>
<commandpath>
<headerpath>
<configpath>
<legalpath>
<nativelibpath>
<manpath>
<version>
number attribute. May also have optional
preRelease and build attributes.
<moduleWarning>
reason. See moduleWarnings
attribute above. This element may be specified multiple times.
destFile and classpath are required data.
| Modifier and Type | Class and Description |
|---|---|
| public static class | Jmod.ResolutionWarningReason
Permissible reasons for jmod creation to emit warnings. |
| public class | Jmod.ResolutionWarningSpec
Child element which enables jmod tool warnings. |
| Modifier and Type | Field and Description |
|---|---|
| private Path | classpath
Path of files (usually jar files or directories containing compiled classes) from which to create jmod. |
| private Path | commandPath
Path of directories containing executable files to bundle in the created jmod. |
| private Path | configPath
Path of directories containing configuration files to bundle in the created jmod. |
| private String | hashModulesPattern
Regular expression matching names of modules which depend on the the created jmod's module, for which hashes should be added to the created jmod. |
| private Path | headerPath
Path of directories containing includable header files (such as for other languages) to bundle in the created jmod. |
| private File | jmodFile
Location of jmod file to be created. |
| private Path | legalPath
Path of directories containing legal license files to bundle in the created jmod. |
| private String | mainClass
Main class to execute, if Java attempts to execute jmod's module without specifying a main class explicitly. |
| private Path | manPath
Path of directories containing manual pages to bundle in the created jmod. |
| private Path | modulePath
Path of directories containing modules on which the modules in the classpath depend. |
| private ModuleVersion | moduleVersion
Module version of jmod. |
| private final List | moduleWarnings
Reasons why module resolution during jmod creation may emit warnings. |
| private Path | nativeLibPath
Path of directories containing native libraries needed by classes in the modules comprising the created jmod. |
| private String | platform
Target platform of created jmod. |
| private boolean | resolveByDefault
Whether the created jmod should be seen by Java when present in a module path, even if not explicitly named. |
| private String | version
Module version of jmod. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private Collection | Returns: new list ofjmod argumentsCreates list of arguments to |
| private void | checkDirPaths()
Checks that all paths which are required to be directories only, refer only to directories. |
| public Path | Returns: new, unconfigured child elementAdds an unconfigured |
| public Path | Returns: new, unconfigured child elementCreates a child element which can contain a list of directories containing native executable files to include in the created jmod. |
| public Path | Returns: new, unconfigured child elementCreates a child element which can contain a list of directories containing user configuration files to include in the created jmod. |
| public Path | Returns: new, unconfigured child elementCreates a child element which can contain a list of directories containing compile-time header files for third party use, to include in the created jmod. |
| public Path | Returns: new, unconfigured child elementCreates a child element which can contain a list of directories containing license files to include in the created jmod. |
| public Path | Returns: new, unconfigured child elementCreates a child element which can contain a list of directories containing man pages (program manuals, typically in troff format) to include in the created jmod. |
| public Path | Returns: new, unconfigured child elementCreates a child |
| public Jmod. | Returns: new, unconfigured child elementCreates a child element which can specify the circumstances under which jmod creation emits warnings. |
| public Path | Returns: new, unconfigured child elementCreates a child element which can contain a list of directories containing native libraries to include in the created jmod. |
| public ModuleVersion | Returns: new, unconfigured child elementCreates an uninitialized child element representing the version of the module represented by the created jmod. |
| public void | execute()
Overrides org. |
| public Path | Returns: path of constituent filesAttribute which specifies the files (usually modular .jar files) which will comprise the created jmod file. |
| public Path | Returns: list of directories containing native executablesAttribute containing path of directories which contain native executable files to include in the created jmod. |
| public Path | Returns: list of directories containing user configuration filesAttribute containing list of directories which contain user configuration files. |
| public File | Returns: location of jmod fileAttribute containing the location of the jmod file to create. |
| public String | Returns: regex specifying which dependent modules should have their generated hashes includedAttribute containing a regular expression which specifies which of the modules that depend on the jmod being created should have hashes generated and added to the jmod. |
| public Path | Returns: path of directories containing header filesAttribute containing a path of directories which hold compile-time header files for third party use, all of which will be included in the created jmod. |
| public Path | Returns: path containing directories which hold license filesAttribute containing list of directories which hold license files to include in the created jmod. |
| public String | Returns: fully-qualified name of jmod's main classAttribute containing the class that acts as the executable entry point of the created jmod. |
| public Path | Returns: path containing directories which hold man pages to include in jmodAttribute containing list of directories containing man pages to include in created jmod. |
| public Path | Returns: path of directories containing modules needed by classpath modulesAttribute containing path of directories which contain modules on which the created jmod's constituent modules depend. |
| public Path | Returns: path of directories containing native librariesAttribute containing list of directories which hold native libraries to include in the created jmod. |
| public String | Returns: OS and architecture for which jmod will be built, ornullAttribute containing the platform for which the jmod will be built. |
| public boolean | Returns: whether jmod should be visible in module pathsAttribute indicating whether the created jmod should be visible in a module path, even when not specified explicitly. |
| public String | Returns: module version for created jmodAttribute which specifies a module version for created jmod. |
| private static boolean | Returns: true if resource exists and is not a directory, false if it is a directory or does not existresource to check resource)Checks whether a resource is a directory. |
| public void | setClasspath(final Path
path of files that will comprise jmod path)Sets attribute specifying the files that will comprise the created jmod file. |
| public void | setClasspathRef(final Reference
reference to path which will act as classpath ref)Sets classpath attribute from a path reference. |
| public void | setCommandPath(final Path
list of directories containing native executables path)Sets attribute containing path of directories which contain native executable files to include in the created jmod. |
| public void | setCommandPathRef(final Reference
reference to path which will act as command path ref)Sets command path from a path reference. |
| public void | setConfigPath(final Path
list of directories containing user configuration files path)Sets attribute containing list of directories which contain user configuration files. |
| public void | setConfigPathRef(final Reference
reference to path which will act as configuration file path ref)Sets configuration file path from a path reference. |
| public void | setDestFile(final File
location where jmod file will be created. file)Sets attribute containing the location of the jmod file to create. |
| public void | setHashModulesPattern(final String
regex specifying which dependent modules should have
their generated hashes included pattern)Sets attribute containing a regular expression which specifies which of the modules that depend on the jmod being created should have hashes generated and added to the jmod. |
| public void | setHeaderPath(final Path
path of directories containing header files path)Sets attribute containing a path of directories which hold compile-time header files for third party use, all of which will be included in the created jmod. |
| public void | setHeaderPathRef(final Reference
reference to path which will act as header path ref)Sets header path from a path reference. |
| public void | setLegalPath(final Path
path containing directories which hold license files path)Sets attribute containing list of directories which hold license files to include in the created jmod. |
| public void | setLegalPathRef(final Reference
reference to path which will act as legal path ref)Sets legal licenses path from a path reference. |
| public void | setMainClass(final String
fully-qualified name of jmod's main class className)Sets attribute containing the class that acts as the executable entry point of the created jmod. |
| public void | setManPath(final Path
path containing directories which hold man pages to include
in jmod path)Sets attribute containing list of directories containing man pages to include in created jmod. |
| public void | setManPathRef(final Reference
reference to path which will act as module path ref)Sets man pages path from a path reference. |
| public void | setModulePath(final Path
path of directories containing modules needed by
classpath modules path)Sets attribute containing path of directories which contain modules on which the created jmod's constituent modules depend. |
| public void | setModulePathRef(final Reference
reference to path which will act as module path ref)Sets module path from a path reference. |
| public void | setModuleWarnings(final String
list containing one or more of the above values,
separated by commas warningList)Sets attribute containing a comma-separated list of reasons for jmod creation to emit warnings. |
| public void | setNativeLibPath(final Path
path of directories containing native libraries path)Sets attribute containing list of directories which hold native libraries to include in the created jmod. |
| public void | setNativeLibPathRef(final Reference
reference to path which will act as native library path ref)Sets native library path from a path reference. |
| public void | setPlatform(final String
platform for which jmod will be created, or platform)nullSets attribute containing the platform for which the jmod will be built. |
| public void | setResolveByDefault(final boolean
whether jmod should be visible in module paths resolve)Sets attribute indicating whether the created jmod should be visible in a module path, even when not specified explicitly. |
| public void | setVersion(final String
module version of created jmod version)Sets the module version for the created jmod. |
| classpath | back to summary |
|---|---|
| private Path classpath Path of files (usually jar files or directories containing compiled classes) from which to create jmod. | |
| commandPath | back to summary |
|---|---|
| private Path commandPath Path of directories containing executable files to bundle in the created jmod. | |
| configPath | back to summary |
|---|---|
| private Path configPath Path of directories containing configuration files to bundle in the created jmod. | |
| hashModulesPattern | back to summary |
|---|---|
| private String hashModulesPattern Regular expression matching names of modules which depend on the the created jmod's module, for which hashes should be added to the created jmod. | |
| headerPath | back to summary |
|---|---|
| private Path headerPath Path of directories containing includable header files (such as for other languages) to bundle in the created jmod. | |
| jmodFile | back to summary |
|---|---|
| private File jmodFile Location of jmod file to be created. | |
| legalPath | back to summary |
|---|---|
| private Path legalPath Path of directories containing legal license files to bundle in the created jmod. | |
| mainClass | back to summary |
|---|---|
| private String mainClass Main class to execute, if Java attempts to execute jmod's module without specifying a main class explicitly. | |
| manPath | back to summary |
|---|---|
| private Path manPath Path of directories containing manual pages to bundle in the created jmod. | |
| modulePath | back to summary |
|---|---|
| private Path modulePath Path of directories containing modules on which the modules in the classpath depend. | |
| moduleVersion | back to summary |
|---|---|
| private ModuleVersion moduleVersion Module version of jmod. Either this or | |
| moduleWarnings | back to summary |
|---|---|
| private final List<Jmod. Reasons why module resolution during jmod creation may emit warnings. | |
| nativeLibPath | back to summary |
|---|---|
| private Path nativeLibPath Path of directories containing native libraries needed by classes in the modules comprising the created jmod. | |
| platform | back to summary |
|---|---|
| private String platform Target platform of created jmod. Examples are | |
| resolveByDefault | back to summary |
|---|---|
| private boolean resolveByDefault Whether the created jmod should be seen by Java when present in a module path, even if not explicitly named. Normally true. | |
| version | back to summary |
|---|---|
| private String version Module version of jmod. Either this or | |
| Jmod | back to summary |
|---|---|
| public Jmod() | |
| buildJmodArgs | back to summary |
|---|---|
| private Collection Creates list of arguments to
| |
| checkDirPaths | back to summary |
|---|---|
| private void checkDirPaths() Checks that all paths which are required to be directories only, refer only to directories.
| |
| createClasspath | back to summary |
|---|---|
| public Path createClasspath() Adds an unconfigured
| |
| createCommandPath | back to summary |
|---|---|
| public Path createCommandPath() Creates a child element which can contain a list of directories containing native executable files to include in the created jmod.
| |
| createConfigPath | back to summary |
|---|---|
| public Path createConfigPath() Creates a child element which can contain a list of directories containing user configuration files to include in the created jmod.
| |
| createHeaderPath | back to summary |
|---|---|
| public Path createHeaderPath() Creates a child element which can contain a list of directories containing compile-time header files for third party use, to include in the created jmod.
| |
| createLegalPath | back to summary |
|---|---|
| public Path createLegalPath() Creates a child element which can contain a list of directories containing license files to include in the created jmod.
| |
| createManPath | back to summary |
|---|---|
| public Path createManPath() Creates a child element which can contain a list of directories containing man pages (program manuals, typically in troff format) to include in the created jmod.
| |
| createModulePath | back to summary |
|---|---|
| public Path createModulePath() Creates a child
| |
| createModuleWarning | back to summary |
|---|---|
| public Jmod. Creates a child element which can specify the circumstances under which jmod creation emits warnings.
| |
| createNativeLibPath | back to summary |
|---|---|
| public Path createNativeLibPath() Creates a child element which can contain a list of directories containing native libraries to include in the created jmod.
| |
| createVersion | back to summary |
|---|---|
| public ModuleVersion createVersion() Creates an uninitialized child element representing the version of the module represented by the created jmod.
| |
| execute | back to summary |
|---|---|
| public void execute() throws BuildException Overrides org. Creates a jmod file according to this task's properties and child elements.
| |
| getClasspath | back to summary |
|---|---|
| public Path getClasspath() Attribute which specifies the files (usually modular .jar files) which will comprise the created jmod file.
| |
| getCommandPath | back to summary |
|---|---|
| public Path getCommandPath() Attribute containing path of directories which contain native executable files to include in the created jmod.
| |
| getConfigPath | back to summary |
|---|---|
| public Path getConfigPath() Attribute containing list of directories which contain user configuration files.
| |
| getDestFile | back to summary |
|---|---|
| public File getDestFile() Attribute containing the location of the jmod file to create.
| |
| getHashModulesPattern | back to summary |
|---|---|
| public String getHashModulesPattern() Attribute containing a regular expression which specifies which of the modules that depend on the jmod being created should have hashes generated and added to the jmod.
| |
| getHeaderPath | back to summary |
|---|---|
| public Path getHeaderPath() Attribute containing a path of directories which hold compile-time header files for third party use, all of which will be included in the created jmod.
| |
| getLegalPath | back to summary |
|---|---|
| public Path getLegalPath() Attribute containing list of directories which hold license files to include in the created jmod.
| |
| getMainClass | back to summary |
|---|---|
| public String getMainClass() Attribute containing the class that acts as the executable entry point of the created jmod.
| |
| getManPath | back to summary |
|---|---|
| public Path getManPath() Attribute containing list of directories containing man pages to include in created jmod. Man pages are textual program manuals, typically in troff format.
| |
| getModulePath | back to summary |
|---|---|
| public Path getModulePath() Attribute containing path of directories which contain modules on which the created jmod's constituent modules depend.
| |
| getNativeLibPath | back to summary |
|---|---|
| public Path getNativeLibPath() Attribute containing list of directories which hold native libraries to include in the created jmod.
| |
| getPlatform | back to summary |
|---|---|
| public String getPlatform() Attribute containing the platform for which the jmod
will be built. Platform values are defined in the
| |
| getResolveByDefault | back to summary |
|---|---|
| public boolean getResolveByDefault() Attribute indicating whether the created jmod should be visible in a module path, even when not specified explicitly. True by default.
| |
| getVersion | back to summary |
|---|---|
| public String getVersion() Attribute which specifies a module version for created jmod.
| |
| isRegularFile | back to summary |
|---|---|
| private static boolean isRegularFile(Resource resource) Checks whether a resource is a directory. Used for checking validity of jmod path arguments which have to be directories.
| |
| setClasspath | back to summary |
|---|---|
| public void setClasspath(final Path path) Sets attribute specifying the files that will comprise the created jmod file. Usually this contains a single modular .jar file. The classpath is required and must not be empty.
| |
| setClasspathRef | back to summary |
|---|---|
| public void setClasspathRef(final Reference ref) Sets classpath attribute from a path reference.
| |
| setCommandPath | back to summary |
|---|---|
| public void setCommandPath(final Path path) Sets attribute containing path of directories which contain native executable files to include in the created jmod.
| |
| setCommandPathRef | back to summary |
|---|---|
| public void setCommandPathRef(final Reference ref) Sets command path from a path reference.
| |
| setConfigPath | back to summary |
|---|---|
| public void setConfigPath(final Path path) Sets attribute containing list of directories which contain user configuration files.
| |
| setConfigPathRef | back to summary |
|---|---|
| public void setConfigPathRef(final Reference ref) Sets configuration file path from a path reference.
| |
| setDestFile | back to summary |
|---|---|
| public void setDestFile(final File file) Sets attribute containing the location of the jmod file to create. This value is required.
| |
| setHashModulesPattern | back to summary |
|---|---|
| public void setHashModulesPattern(final String pattern) Sets attribute containing a regular expression which specifies which of the modules that depend on the jmod being created should have hashes generated and added to the jmod.
| |
| setHeaderPath | back to summary |
|---|---|
| public void setHeaderPath(final Path path) Sets attribute containing a path of directories which hold compile-time header files for third party use, all of which will be included in the created jmod.
| |
| setHeaderPathRef | back to summary |
|---|---|
| public void setHeaderPathRef(final Reference ref) Sets header path from a path reference.
| |
| setLegalPath | back to summary |
|---|---|
| public void setLegalPath(final Path path) Sets attribute containing list of directories which hold license files to include in the created jmod.
| |
| setLegalPathRef | back to summary |
|---|---|
| public void setLegalPathRef(final Reference ref) Sets legal licenses path from a path reference.
| |
| setMainClass | back to summary |
|---|---|
| public void setMainClass(final String className) Sets attribute containing the class that acts as the executable entry point of the created jmod.
| |
| setManPath | back to summary |
|---|---|
| public void setManPath(final Path path) Sets attribute containing list of directories containing man pages to include in created jmod. Man pages are textual program manuals, typically in troff format.
| |
| setManPathRef | back to summary |
|---|---|
| public void setManPathRef(final Reference ref) Sets man pages path from a path reference.
| |
| setModulePath | back to summary |
|---|---|
| public void setModulePath(final Path path) Sets attribute containing path of directories which contain modules on which the created jmod's constituent modules depend.
| |
| setModulePathRef | back to summary |
|---|---|
| public void setModulePathRef(final Reference ref) Sets module path from a path reference.
| |
| setModuleWarnings | back to summary |
|---|---|
| public void setModuleWarnings(final String warningList) Sets attribute containing a comma-separated list of reasons for
jmod creation to emit warnings. Valid values in list are:
| |
| setNativeLibPath | back to summary |
|---|---|
| public void setNativeLibPath(final Path path) Sets attribute containing list of directories which hold native libraries to include in the created jmod.
| |
| setNativeLibPathRef | back to summary |
|---|---|
| public void setNativeLibPathRef(final Reference ref) Sets native library path from a path reference.
| |
| setPlatform | back to summary |
|---|---|
| public void setPlatform(final String platform) Sets attribute containing the platform for which the jmod
will be built. Platform values are defined in the
A JDK's platform can be viewed with a command like:
| |
| setResolveByDefault | back to summary |
|---|---|
| public void setResolveByDefault(final boolean resolve) Sets attribute indicating whether the created jmod should be visible in a module path, even when not specified explicitly. True by default.
| |
| setVersion | back to summary |
|---|---|
| public void setVersion(final String version) Sets the module version for the created jmod.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | DEPRECATED
String value indicating warnings are emitted for modules marked as deprecated (but not deprecated for removal). |
| public static final String | INCUBATING
String value indicating warnings are emitted for modules designated as "incubating" in the JDK. |
| public static final String | LEAVING
String value indicating warnings are emitted for modules marked as deprecated for removal. |
| private static final Map | VALUES_TO_OPTIONS
Maps Ant task values to jmod option values. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | getValues()
Implements abstract org. |
| pack-priv String | Returns: jmod option valueConverts this object's current value to a jmod tool option value. |
| public static Jmod. |
| DEPRECATED | back to summary |
|---|---|
| public static final String DEPRECATED String value indicating warnings are emitted for modules marked as deprecated (but not deprecated for removal). | |
| INCUBATING | back to summary |
|---|---|
| public static final String INCUBATING String value indicating warnings are emitted for modules designated as "incubating" in the JDK. | |
| LEAVING | back to summary |
|---|---|
| public static final String LEAVING String value indicating warnings are emitted for modules marked as deprecated for removal. | |
| VALUES_TO_OPTIONS | back to summary |
|---|---|
| private static final Map<String, String> VALUES_TO_OPTIONS Maps Ant task values to jmod option values. | |
| ResolutionWarningReason | back to summary |
|---|---|
| public ResolutionWarningReason() | |
| getValues | back to summary |
|---|---|
| public String[] getValues() Implements abstract org. Doc from org. This is the only method a subclass needs to implement. | |
| toCommandLineOption | back to summary |
|---|---|
| pack-priv String toCommandLineOption() Converts this object's current value to a jmod tool option value.
| |
| valueOf | back to summary |
|---|---|
| public static Jmod. Converts a string to a
| |
| Modifier and Type | Field and Description |
|---|---|
| private Jmod. | reason
Condition which should trigger jmod warning output. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ResolutionWarningSpec(String
non reason)null Jmod.
valueCreates an element with the given reason attribute. |
| Modifier and Type | Method and Description |
|---|---|
| public Jmod. | Returns: condition which triggers jmod warningsRequired attribute containing reason for emitting jmod warnings. |
| public void | setReason(Jmod.
condition which triggers jmod warnings reasonSets attribute containing reason for emitting jmod warnings. |
| public void |
| reason | back to summary |
|---|---|
| private Jmod. Condition which should trigger jmod warning output. | |
| ResolutionWarningSpec | back to summary |
|---|---|
| public ResolutionWarningSpec() Creates an uninitialized element. | |
| ResolutionWarningSpec | back to summary |
|---|---|
| public ResolutionWarningSpec(String reason) Creates an element with the given reason attribute.
| |
| getReason | back to summary |
|---|---|
| public Jmod. Required attribute containing reason for emitting jmod warnings.
| |
| setReason | back to summary |
|---|---|
| public void setReason(Jmod. Sets attribute containing reason for emitting jmod warnings.
| |
| validate | back to summary |
|---|---|
| public void validate() Verifies this object's state.
| |