[Samba] Samba Share Mounts with Java
Udo Rader
udo.rader at bestsolution.at
Thu Mar 27 14:37:47 GMT 2008
On Thu, 2008-03-27 at 08:05 -0600, josgreen at idoc.idaho.gov wrote:
> Hello,
>
> I am developing a Java application that requires me to read from
> and write to a samba share. When developing in a windows environment
> this was not a problem. I mounted the share as "M:/", built a path to
> a file, checked if the file exists using the Java function
> file.exists(), and went on my merry way. Now I am developing in a
> Linux environment(SuSE 10). I mount the samba share to a folder and
> when I build the path it will find and display the image, however the
> check in Java(file.exists()) does not function properly. I ALWAYS get
> a return value of false. Any help with this issue would be
> appreciated. Thanks!!!
please show the contents of file.getAbsolutePath() resp.
file.getRelativePath() and how you mounted the share (mount options).
What I could think of are two things:
1. upper/lowercasing problem
-------
eg. when you told samba to ignore the case, but (maybe) Java doesn't
handle it correctly when using file.exists()
2. wrong path separators
-------
What kind of path separators do you use (backslash vs. forwardslash)?
--
Udo Rader
bestsolution.at EDV Systemhaus GmbH
http://www.bestsolution.at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba/attachments/20080327/7b3bc0c0/attachment.bin
More information about the samba
mailing list