Re: [Samba] Samba Share Mounts with Java
- Date: Fri, 28 Mar 2008 01:14:19 +0100
- From: Udo Rader <udo.rader@xxxxxxxxxxxxxxx>
- Subject: Re: [Samba] Samba Share Mounts with Java
On Thu, 2008-03-27 at 12:66 -0600, josgreen@xxxxxxxxxxxxxx wrote: > > >>> Udo Rader <udo.rader@xxxxxxxxxxxxxxx> 03/27/08 8:37 AM >>> > On Thu, 2008-03-27 at 08:05 -0600, josgreen@xxxxxxxxxxxxxx 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!!! > Udo, > > Thanks for taking a look at my issue. I used the following command to > mount the share... > > mount -t smbfs -o username=mediauser,password-med08cis > //132.32.43.11/media > /home/josgreen/tools/jakarto-tomcat-5.0.19/webapps/associate/media > > file.getAbsolutePath - /media/associate/9782/facial/9782_f.jpg > file.getPath - /media/associate/9782/facial/9782_f.jpg > > As just another FYI I should also mention that I am running tomcat as > my application server. Thanks again! Hmm, your samba mount is in /home/josgreen/tools/jakarto-tomcat-5.0.19/webapps/associate/media but the file you are looking for is in /media/associate/9782/facial/9782_f.jpg so that cannot work at all. Either mount your samba share like this % mount -t smbfs -o username=mediauser,password-med08cis //132.32.43.11/media /media or correct the path of your file object or maybe symlink the directory like this: % ln -s /home/josgreen/tools/jakarto-tomcat-5.0.19/webapps/associate/media /media This is by no means a samba problem :-) Please update your samba password now, because everybody on this list knows it now :-) -- Udo Rader bestsolution.at EDV Systemhaus GmbH http://www.bestsolution.at
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
-- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba
- References:
- [Samba] Samba Share Mounts with Java
- From: josgreen
- Re: [Samba] Samba Share Mounts with Java
- From: Udo Rader
- [Samba] Samba Share Mounts with Java
- Prev by Date: Re: [Samba] Still get error 13 when mounting w2k3 share
- Next by Date: [Samba] Samba 3.0.25b as a domain member to a Samba PDC
- Previous by thread: Re: [Samba] Samba Share Mounts with Java
- Next by thread: [Samba] Still get error 13 when mounting w2k3 share
- Index(es):