Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot open network directory  RSS feed

 
Jiri Nejedly
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I have 2 PCs on local network. Both Windows 7, both have the same user to log in. In one PC there is shared folder.
Privileges are set for mentioned user for reading. In second PC I have this folder mapped as network drive (letter X) and
I can read its contents without any problems (for example via total commander).

Problem is in java. When in my code (debugged in JDeveloper) I construct new File(directory) and call
method exists() or isDirectory() or canRead() , they all return false.

That's strange, I recently reinstalled whole windows (on the PC where java code is run).
Before that I didn't have any such problems. Did I forgot something to setup ? Thanks.

 
Jiri Nejedly
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found out this - if I try open dir with drive letter such as
X:/
, it doesn't work.
But this is ok
//<server>/<directory>

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!