js protocol basis for java