prepare js code to be converted to java