The BundleWorks command bw bundle can be used to create a bundle archive from existing software. This includes third-party software like Apache, MySQL, Tomcat, the Java JDK, and others.
Type bw bundle jdk $HOME/works tgz to wrap your java installation and put the resulting bundle archive inside your 'works' directory. You will be asked for your Java home and version. The following values are for MacOSX (10.4.10):
$ bw bundle jdk $HOME/works tgz Enter your Java home directory: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home Enter your Java version: 1.5.0_07 OK - Built '/home/admin/works/jdk-1.5.0_07.tgz' from bundler 'jdk'.
Now add the jdk bundle to your inventory, using the following command (use your Java version in place of 1.5.0_07):
bw add $HOME/works/jdk-1.5.0_07.tgz $HOME/works/bundles/
Use the bw list available command to verify that a jdk bundle has been added to the available bundles list.