See java/installer2/ directory for AEI2 code.