java: regeneration