cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

NBIBundledJVM

Revision as of 14:38, 5 November 2009 by Admin (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

How to bundle JVM (JRE/JDK) in the installer bundle?

Contents

How to create JVM in the format suitable for bundling?

  1. Create temporary directory and copy there all files from the JVM you want to bundle
  2. (Optional) Pack jars using bin/pack200 utility:
    ./bin/pack200 -J-Xmx1024m lib/rt.jar.pack.gz lib/rt.jar
  • Note that you cannot pack the following list of jars:
  • jce.jar
  • local_policy.jar
  • sunjce_provider.jar
  • sunpkcs11.jar
  • US_export_policy.jar
  • sunmscapi.jar
  1. Zip the directory contents to any zip file:
  • zip -9 -r -y ../jvm.zip .
  1. Create self-extracted zip archive using tools UnZipSFX tools for particular platform:
  • copy /B unzipsfx.exe + jvm.zip jvm.exe (windows)
    cat unzipsfx.bin jvm.zip > jvm.bin (unix)
  • zip -A jvm.exe (windows)
    zip -A jvm.bin (unix)
  1. Run NBI in create bundle mode with adding the following parameter -J-Dnbi.bundled.jvm.file=<path-to-jvm.exe>


Tools for automatic bundle JVM creation

You can find all tools (scripts, unzipsfx binaries) at nbi/infra/build/jvm