I have a TimerTask object which polls a directory looking for documents which tell the system what to do. It acts properly on my development system but won't work in deployment.
The code is below.
In checkShutDown() you can see the dir the system looks at for instructions, "c:\\rai\\temp\\". The system makes this dir when it first starts so I know it works (plus I'm getting a console printout for testing right now as you can see). This part is consistent on both the dev and deployment testing systems.
The problem is under run():
File f = new File(xmlDoc);
IN_XML = f.exists();
IN_XML will return false no matter what is in the dir. checkShutDown() does not see the shutdown command either but I'm sure that's the same problem so I'll stick to the one issue for now.
The process document is an xml document. It is named ImageProcessXML.xml. It is put in the c:\rai\temp directory. So the string that is passed to the File object is "c:\\rai\\temp\\ImageProcessXML.xml". When I check to see if it exists, "IN_XML = f.exists()" I get false every time so the ImageProcessor never starts up. If I comment out that line, the system finds the doc and runs the XML parser. How can this be? The same problem is found in checkShutDown(), system returns false for exists on that document too - but works perfectly on the development box.
Thanks for your help.
Tom