Class jlink
- java.lang.Object
- 
- org.apache.tools.ant.taskdefs.optional.jlink.jlink
 
- 
 public class jlink extends java.lang.Objectjlink links together multiple .jar files.
- 
- 
Constructor SummaryConstructors Constructor Description jlink()
 - 
Method SummaryModifier and Type Method Description voidaddAddFile(java.lang.String fileToAdd)Adds a file to be added into the output.voidaddAddFiles(java.lang.String... filesToAdd)Adds several files to be added into the output.voidaddMergeFile(java.lang.String fileToMerge)Adds a file to be merged into the output.voidaddMergeFiles(java.lang.String... filesToMerge)Adds several files to be merged into the output.voidlink()Performs the linking of files.static voidmain(java.lang.String[] args)The command line entry point for jlink.voidsetCompression(boolean compress)Determines whether output will be compressed.voidsetOutfile(java.lang.String outfile)The file that will be created by this instance of jlink.
 
- 
- 
- 
Method Detail- 
setOutfilepublic void setOutfile(java.lang.String outfile) The file that will be created by this instance of jlink.- Parameters:
- outfile- the file to create.
 
 - 
addMergeFilepublic void addMergeFile(java.lang.String fileToMerge) Adds a file to be merged into the output.- Parameters:
- fileToMerge- the file to merge into the output.
 
 - 
addAddFilepublic void addAddFile(java.lang.String fileToAdd) Adds a file to be added into the output.- Parameters:
- fileToAdd- the file to add to the output.
 
 - 
addMergeFilespublic void addMergeFiles(java.lang.String... filesToMerge) Adds several files to be merged into the output.- Parameters:
- filesToMerge- an array of files to merge into the output.
 
 - 
addAddFilespublic void addAddFiles(java.lang.String... filesToAdd) Adds several files to be added into the output.- Parameters:
- filesToAdd- an array of files to add to the output.
 
 - 
setCompressionpublic void setCompression(boolean compress) Determines whether output will be compressed.- Parameters:
- compress- if true use compression.
 
 - 
linkpublic void link() throws java.lang.ExceptionPerforms the linking of files. Addfiles are added to the output as-is. For example, a jar file is added to the output as a jar file. However, mergefiles are first examined for their type. If it is a jar or zip file, the contents will be extracted from the mergefile and entered into the output. If a zip or jar file is encountered in a subdirectory it will be added, not merged. If a directory is encountered, it becomes the root entry of all the files below it. Thus, you can provide multiple, disjoint directories, as addfiles: they will all be added in a rational manner to outfile.- Throws:
- java.lang.Exception- on error.
 
 - 
mainpublic static void main(java.lang.String[] args) The command line entry point for jlink.- Parameters:
- args- an array of arguments
 
 
- 
 
-