Java+JS example