I posted this question in Stack Overflow, and someone redirected me here:
Hello everyone. I'm doing a Windows Service in Java, this service list the files in a directory and write the results in a file. My problem is that when i call Java.File.isDirectory() when the service is running it always results false (It works well when i run the service manually as any other program). Besides, if i try the following: for(File F : directorio.listFiles()) trows an exception when i run the program as a service. I believe is permission related, because when i change the account in which the service is running to my own credentials it list the files correctly. Do you know if there is a workaround? (Change a windows policy, another kind of special account, another way to list the files of the directory, any other thing maybe i'm missing). Thanks in advance.