Make java an optional dependence