Manually switch java preference