Java utilities and helpers