Add $java_home and $num_partitions parameters

Change-Id: I33ba6c628b94dcae4afed0baff327be800821107