Hi all.
I installed the new DE 12.0 with the embedded DB. The service and the DB work without problems.
I have a problem when i try to write a control file on the master server using an alert.
I created the alert with the option "run this JavaScript" anche the JS is:
"var tipoWrite = true;
function WriteToFile(fileName, strContent, tipoWrite) {
var file = new java.io.File(fileName);
var printResult = new java.lang.String();
printResult = '';
var pw = new java.io.PrintWriter(new java.io.BufferedWriter(new java.io.FileWriter(file, tipoWrite)));
printResult = printResult + strContent+'\n';
pw.print(printResult);
pw.flush();
pw.close();
}
var fileName='destinationPATH'+WOB._name+'.'+WOB._qualifier;
var applTstamp=APPL._SYEAR+'-'+APPL._SMM+'-'+APPL._SDD+' '+APPL._SHH+':'+APPL._SMN+'.'+APPL._SSS;
var fileContent = APPL._name+'|'+APPL._gen+'|'+WOB._name+'|'+WOB._qualifier+'|'+applTstamp;
WriteToFile(fileName, fileContent, tipoWrite);
var fileName='destinationPATH2'+WOB._name+'.'+WOB._qualifier;
var applTstamp=APPL._SYEAR+'-'+APPL._SMM+'-'+APPL._SDD+' '+APPL._SHH+':'+APPL._SMN+'.'+APPL._SSS;
var fileContent = APPL._name+'|'+APPL._gen+'|'+WOB._name+'|'+WOB._qualifier+'|'+applTstamp;
WriteToFile(fileName, fileContent, tipoWrite);"
the JS can't write the file and i read in the error log "TypeError: [JavaPackage java.io.File] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (<cybscope>#5)".
The java version is 1.6.0_39.
what can i do fix this error?
Thank you all.