ganeshp wrote:Assuming that your file actually exists and /tmp is not an nfs mounted remote directory and the file is not a symbolic link then neither of the two bugs will cause your problem. I use file.exists() on Linux and have never seen the problem you are reporting when the file is actually a file.
Thanks for that link.
So , i there any work around for this issuse ?
ganeshp wrote:You sure you're not trying to find your Linux file on your Windows machine? If your code is running on a Windows machine you'll have to do more than what you already have to check for a file on a your Linux computer.
Previlage is rw-r-r and the file is in /tmp/file.txt.
I guess the previlage is OK as all users are permitted to read the file.
I am performing this File.exists() check through a web-application.
The web-application server is running on a windows machine.
Edited by: ganeshp on Dec 26, 2007 6:55 AM
does anybody know whats happening here?Both strings refer to the same file path on a Windows machine where C: is the "root" drive. When you check for the existence of "/tmp/file.txt" on a Windows box -- which is what you are doing with your code -- it will look for the file at "c:\tmp\file.txt". Java will interpret forward slashes properly as directory separators when the JRE is running on Windows.