Add java support in js