General Java utilities