adding new mechanism for setting fields in the Java side
fixing loading order