This content has been marked as final. Show 5 replies
sabre150 wrote:Depends on where the code exactly blows, the stacktrace gives no hint what the root call is. Methinks things already go wrong during the creation of the filechooser object, but I can only guess.
What if the default directory when running from the .bat file is not the same as that obtained when using the task scheduler? Easy enough to check by printing it out .
Strange code anyway to use a filechooser to get a directory, especially when apparently no actual GUI is created. That seems like something that can easily change between Java releases.
gimbal2 wrote:My immediate thought when I saw the code. I'm not even sure there is a default directory if the component is not realized but I have never checked. I would like to suggest to the OP that he uses the "user.home" directory but again I have never checked where that points when used with the task scheduler. It could be that it is not defined and that file chooser uses this as the default if not explicitly set. This is why I suggest that the OP writes out the value.
Strange code anyway to use a filechooser to get a directory, especially when apparently no actual GUI is created.
@sabre150 that's the directory that prints out when i use the .bat file. The problem is that the program won't even print the default directory when i ran it via task scheduler it already prints the error. I can't even determine if it searches for the wrong directory or not.
Report FILE: \\'ServerName'\'Department'\'Division'\Systems\'Group'\'User'\My Documents\Data Center (Warranty) Hardware .xls
The account being used is not local but i have already tried using the same account on other scheduled tasks and it works. I'm going to try to use a Local account hopefully that would work.
Edited by: jaycroll on Oct 22, 2012 8:32 PM