Java common utility