![]() |
|
Tools Main |
Usage: bam {cu} [avgfmkw] [assembly_filename] [manifest_filename] [key_filename] [java_classfile_dir] [-C dir] input_assembly_files �
The bam tool is used to merge multiple assembly files produced by the javac compiler into a single .NET assembly file. The syntax for using the bam tool is similar to the syntax for the Java jar tool. At a minimum, you must specify either a c or u option together with two or more input_assembly_files. All other options and parameters will take on default values as described below.
Create a new assembly file, overwriting an existing assembly with the same name. See the f option below for assembly file naming conventions. The new assembly will be created by merging the input-assembly-files into one assembly.
Update an existing assembly file by adding or replacing the classes found in the assembly with those found in the input-assembly-files. If the assembly file doesn't exist, then it will act as if the c option was used and create a new output assembly. See the f option below for assembly file naming conventions.
Specify the output assembly_filename that bam will either update or create. If you omit the f option, bam will either create (c), or update (u) an assembly in the current directory with the same name as the directory and with a .dll file name extension.
Specify the key_filename (.snk) that will be used in delay signing the output assembly.
Delete the merged assemblies upon completion.
Merge the debug symbols of the input assembly files, if present, into symbols for the output assembly.
Generage verbose output to stdout when processing assemblies.
Change directory to directory. Merge all assemblies with .class file extensions found in that directory into the output assembly.
Specifies the name of a manifest_filename to control the assembly merge process. The syntax of the manifest file is based on the OSGI bundle syntax, with some additions specific to Ja.NET SE.
Create or update Java .class files with the Ja.NET SE assembly module class file attribute. For more details, see the section on Ja.NET SE custom class loader support.
This option implies the a option, as well, and is used to specify the java_classfile_dir in which to search for Java .class files to update or create.
C:\myDir> bam c *.class
The above example creates an assembly with the name myDir.dll in the C:\MyDir directory, overwriting myDir.dll if it already exists.
C:\mydir> bam cf myAssembly.dll *.class
This will combine the entire set of .class files generated by the javac compiler in the C:\mydir into an assembly named myAssembly.dll.It will overwrite it if it already exists. If you used the u option, instead of c, bam would update the existing assembly if it already existed, rather than overwriting it. When using any of the fmkw options, you need to be aware that each of those options are paired with an additional required option on the command line. It is important to understand that the order in which you specify the fmkw options further dictates the order in which additional parameters are specified on the command line.
C:\mydir> bam cfk myAssembly.dll myKey.snk *.class
Since the f option precedes the k option, you must specify the [assembly_filename] parameter first, followed by the [key_filename] parameter. If the f and k options had been reversed the filename parameters would also need to be reversed. The command line should look like this:
C:\mydir> bam ckf myKey.snk myAssembly.dll *.classC:\myDir> bam cfw myAssembly.dll .\classes .\netclasses
The above example creates a new assembly with the name myAssembly.dll by combining all assemblies found as a result of recursively searching all subdirectories starting in C:\myDir\netclasses for assemblies with the .class filename extension. Also, for each assembly it finds in C:\myDir\netclasses, it searches for a corresponding Java .class file with the same name in the directory C:\myDir\classes. If found, it updates the .class file to include the Ja.NET SE assembly module class file attribute. If a corresponding Java .class file is not found, it will create a new one with the attribute.