I have solved the second question.
But still don't know why I can't use File.createTempFile.
Error codes that cause IOException in parsing on both Window and Linux
---------------------------------
diskScript = File.createTempFile("sakaiscript","xml");
xmlscript = docBuilder.parse(diskScript);
----------------------------------
Corrected codes
---------------------------------
diskScript = new File("c:\\script.xml");
xmlscript = docBuilder.parse(diskScript);
----------------------------------