Js working in java