from js to java