NXP-14727: better init for Java code