common operate for java.