Revert "remove java opts"

This reverts commit 744235aa1bc3208ccdcf7c7d5af61e97ef09a6c9.