Oh! I solved it!
Thank you all!
void WriteToFile ( String MyText ){
// Write to file
final String fileName = "output.pov";
// for save
PrintWriter output;
int i = 13;
int i2 = 10;
char c = char(i);
char c2 = char(i2);
String SketchPath1 = sketchPath("");
// Create a new file in the sketch directory
output = createWriter(fileName);
String Buffer = MyText;
String ReplaceWith = " " + c + c2;
output.println(Buffer.replaceAll ("\n", ReplaceWith )); // Write to the file
output.flush(); // Writes the remaining data to the file
output.close(); // Finishes the file
String[] params = {
"C:\\Programme\\POV-Ray for Windows v3.62\\bin\\pvengine-sse2.exe" , "/RENDER" , "" + SketchPath1 + fileName + "" , "/EDIT" , "" + SketchPath1 + fileName + "" , "/NR" }
;
println (params);
// from http://www.coderanch.com/t/419192/Java-General/java/Runtime-getRuntime-exec-String-command
Runtime rt = Runtime.getRuntime(); //
try {
rt.exec(params ) ; // "mspaint " + strPictureLocation);
}
catch (IOException ioe) {
ioe.printStackTrace();
}
} // function