Acesss Remote Server Folder

Discussions

EJB design: Acesss Remote Server Folder

  1. Acesss Remote Server Folder (2 messages)

    Hello every one,

    I'm trying to write a code that connects to remote windowsNT machine and get list of all the files in a specified folder.
    When i run my code from local win2000 system it works perfectly.. but if run the same code from a unix machine i get NULL POINTER EXCEPETION.

    THIS IS THE WORKING CODE ON MY LOCAL MACHINE
    ***********************************************************
    File file = new File("\\\\remotewindowsnt\\folderX$
    ");
    File list[] = file.listFiles();
    for(int i=0; i<4; i++)
    System.out.println(list[i].getName());

    ***********************************************************

    Please let me know if any of you have a solution for this.

    Thanks in advacne
    Nagendra :)

    Threaded Messages (2)

  2. maybe you could map the drive onto the locaal file system as a samba drive then use it that way ? because im sure you have to add the file type to the beginning of the uri
  3. Acesss Remote Server Folder[ Go to top ]

    I don't agree,that because different file type .If that true,File CAN read some "information",maybe some bytes.

    Maybe some exceptions occurs,so you should try and catch