python: fix adams demo
java: fix Adams demo