access windows network drive

Discussion in 'Java' started by Aljosa Mohorovic, Sep 10, 2007.

  1. i have a windows network drive mapped at "Y:" and i'm trying to access
    folder "Y:\data\test" from web application (spring app).
    if i use local disk ( "C:\data\test" ) everything works fine.

    how can i work with/access folder on windows network drive, what are
    common problems and solutions?

    please post any tips, docs and similar info.

    Aljosa
     
    Aljosa Mohorovic, Sep 10, 2007
    #1
    1. Advertising

  2. Aljosa Mohorovic

    Roedy Green Guest

    On Mon, 10 Sep 2007 13:46:07 -0000, Aljosa Mohorovic
    <> wrote, quoted or indirectly quoted
    someone who said :

    >i have a windows network drive mapped at "Y:" and i'm trying to access
    >folder "Y:\data\test" from web application (spring app).
    >if i use local disk ( "C:\data\test" ) everything works fine.


    try using / instead of \, or else remember to double every \.

    at the command line verify :

    attrib Y:\data\test

    try copying a file to Y:\data\test and copying it back to make sure
    you have full access.

    Experiment with subst J: C:\

    and see if you can access J:\data\test

    I have never used a network drive in a Java app. I don't even know if
    they are supposed to work. Logically they should since you access them
    with the same OS C API as local drives.

    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Sep 10, 2007
    #2
    1. Advertising

  3. Aljosa Mohorovic wrote:

    > i have a windows network drive mapped at "Y:" and i'm trying to access
    > folder "Y:\data\test" from web application (spring app).
    > if i use local disk ( "C:\data\test" ) everything works fine.
    >
    > how can i work with/access folder on windows network drive, what are
    > common problems and solutions?
    >
    > please post any tips, docs and similar info.
    >
    > Aljosa
    >

    You don't say what (if any) errors/exceptions you get.

    Could be permissions (have a look at SecurityManager[1]) or the LAN is
    down. Could also be that someone else is working o the file and has a
    lock.

    [1]
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/SecurityManager.html
    --
    Sabine Dinis Blochberger

    Op3racional
    www.op3racional.eu
     
    Sabine Dinis Blochberger, Sep 12, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James N
    Replies:
    3
    Views:
    5,307
    James N
    Jul 18, 2003
  2. James N
    Replies:
    1
    Views:
    800
    Jeff Trotman
    Jul 18, 2003
  3. mh
    Replies:
    4
    Views:
    706
    Wolfgang Strobl
    May 31, 2005
  4. shailesh
    Replies:
    1
    Views:
    793
    Tim Golden
    Mar 28, 2007
  5. king
    Replies:
    1
    Views:
    284
Loading...

Share This Page