On Linux java.io.tmpdir
is commonly set to /tmp
(note the missing trailing /). Instead of messing around with extra embedded slashes, it's a lot cleaner to use the two-parameter File constructor
File scratchFile = new File(System.getProperty("java.io.tmpdir"),"WCCTempFile.tmp");
That way you don't have to worry about trailing slashes or not.