How to bundle JVM (JRE/JDK) in the installer bundle?
- Create temporary directory and copy there all files from the JVM you want to bundle
- (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
- Zip the directory contents to any zip file:
- zip -9 -r -y ../jvm.zip .
- 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)
- Run NBI in create bundle mode with adding the following parameter -J-Dnbi.bundled.jvm.file=<path-to-jvm.exe>
You can find all tools (scripts, unzipsfx binaries) at
nbi/infra/build/jvm