Java rewrite engine4

delete all klabels and change all when -> requires
I will add it back.