I have tried the below script even I have changed the path as well, but still, I am facing the same issue.
basecost=vars.get("_baseCost");
File=new FileOutputStream ("C:/Rajesh/Automation Stuff/rajesh.txt",true);
P=new PrintStream(File);
this.interpreter.setOut(P);
print(basecost);
File.close();
getting below error
ERROR o.a.j.u.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: `` File=new FileOutputStream ("C:/Rajesh/Automation Stuff/rajesh.txt",true); P= . . . '' : Object constructor

