Java token generator