Maybe because you don't have permission to write in the directory that you are trying to create the temporary file in?
Without more details, it's hard to give you a useful answer. Is this a problem that you encounter in your application? Is your application a desktop Java application, or an applet, or something else? What does the code look like where you call File.createTempFile? In which directory are you trying to create a temporary file? Are you sure you have the right permissions? Do you get error messages? If yes, then what exactly are the error messages?
java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
above the code folder name 'sasi' not available on E: drive. above that code working fine on windows xp. but windows 8 gave error... this is my problem dude...