Fix Java options handling