Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3 Cant output text to a file

open
nobody
None
5
2005-09-01
2005-09-01
MarkB
No

I am trying to output text from beanshell to a file.
Here is the code that I am using:

System.setProperty("outfile", "C:/temp/test.txt");
System.out.println("hello world");
cat("C:/temp/test.txt");

When I run it, "hello world" is printed to the console but
not to the file specified.

Can you help please?

Discussion