Skip Headers

Oracle® JRockit Virtual Edition User's Guide Release 2.0.0 Part Number E22518-01 |
Home | Contents | Contact Us

Previous | Next
| View PDF

# B.1 java-filesystem-imports (optional)

This element contains zero or more `copy` elements, which specify the locations from which the Image Tool (when it assembles the virtual machine image) should copy Java application files to the file system of the virtual machine image.

If you do not specify this element, the resulting virtual machine image will not start. However, you can `put` the Java application files into the virtual machine image later by using the -f (--file) command-line option.

Example

    <jrockitve-filesystem-imports>
       <copy from="src/*" todir="/app"/>
       <copy from="src/app1" tofile="/app/app1.dat"/>
       <copy from="src/*"/>
    </jrockitve-filesystem-imports>

## B.1.1 copy (optional)

You can specify multiple `copy` elements, each of which specifies a local source directory and either a destination directory or destination file in the virtual machine image.

When you create the virtual machine image by using the -a (--assemble) option, the Image Tool copies, recursively, the files from each specified source directory to the corresponding destination.

Any links (including symbolic links) and path references are copied intact; so make sure that your Java application does not contain absolute paths and links to directories outside the directories specified by `java-filesystem-imports`.

Note:

If you do not specify any `copy` element, the Image Tool copies, recursively, the contents of the directory named `root` (in the directory that contains the configuration file) to the root (/) directory in the file system of the virtual machine. If a directory named `root` does not exist in the directory that contains the configuration file, the Image Tool still builds the virtual machine image, but you cannot run the virtual machine until you add a `copy` element.

Attributes

Name | Description | Mandatory / Optional | Default Value
--- | --- | --- | ---
from | The directory or file in the local file system that should be copied to the virtual machine image. The path is relative to the XML configuration file. | Mandatory |
todir | The absolute path of the directory in the file system of the virtual machine image to which the files or directories specified in the `from` attribute should be copied. | Optional | The root directory (/)
tofile | The absolute path and name of the file (in the file system of the virtual machine image) to which the file specified in the `from` attribute should be copied. | Optional | The file specified in the `from` attribute is copied, with the same name, to the root directory (`/`)

Wild cards are supported for all the attributes.

Note:

When specifying directory paths, use the appropriate path delimiters – slash (`/`) on Linux and on UNIX-like systems; backslash (`\`) on Windows – depending on the machine on which you are assembling the virtual machine image.

Examples

- `<copy from="src/*" todir="/app"/>`

  The Image Tool copies, recursively, all the directories and files from the `src` directory in the local file system to the `/app` directory in the file system of the virtual machine image.

- `<copy from="src/app1" tofile="/app/app1.dat"/>`

  The Image Tool copies the `app1` file located in the `src` directory in the local file system to the `/app/app1.dat` file in the file system of the virtual machine image.

- `<copy from="src/*"/>`

  The Image Tool copies, recursively, all the directories and files from the `src` directory in the local file system to the root (`/`) directory in the file system of the virtual machine image.