• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java IO problems  RSS feed

 
javastud412
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have mapped my network drive to another machine and then I use the File class in java to check if a particular file/folder exists in that directory.

eg. Say I have mapped a drive M:/test/application.
and I want to access the folder testingMap in the application folder of the mapped drive.

Now in some machine the line File.exists() checking for the presence of the testingMap folder return true and some machines it returns false.

Can someone throw some light on why this should happen when we are using the exact same code in both machines?

The environment is different. In one machine its NTFS file system and another its Samba based.

My question is how to go about fixing this issue? Is there any alternative way to do the same. I have also tried creating the file using URI option. The same problem persists. The line file.exists() returns false(no exceptions) even though I can see the folder in the system.When can this happen

I really appreciate your response.


Thanks,
 
Stuart Gray
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps a case-sensitivity problem?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!