for java demos