gprimary  java source code