linux new File

Here it is :

under WinNT I have this (working):

File f = new File ("d:\\dir\\whateverFile.txt");

f.isFile() // THIS RETURN TRUE

under Linux i have (not working... how come ?):

File f = new File ("/www/dir/whateverFile.txt");

f.isFile() // THIS RETURN FALSE, BUT SHOULD RETURN TRUE...

Any idea?

[349 byte] By [tyvain] at [2007-9-30 16:21:48]
# 1

With Linux there is the added privilige/responsibility of managing users and security. The user that you are running java from has rights to the directories and files?

Well it might have thrown a security exception.

Which Linux are you running?

I've got a Fedora Core 2 box setup so if you have a snip of code to test, post it.

Martin3 at 2007-7-6 0:03:52 > top of Java-index,Administration Tools,Sun Connection...
# 2
(1) Does the file exist ( and remember Linux is case sensitive with names)(2) Do you have read access to the file, and all the parent directories of the file? If not, then you might get a security exception. If you need to know how to do this type ls -al <filename>
EvilEdna at 2007-7-6 0:03:52 > top of Java-index,Administration Tools,Sun Connection...
# 3
Do have sufficient access rights for the directoy to create the file? What does this command yield:ls -ld /www/dir
BIJ001 at 2007-7-6 0:03:52 > top of Java-index,Administration Tools,Sun Connection...