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 :)
-
Acesss Remote Server Folder (2 messages)
- Posted by: Venkata Nagendra Jalapati
- Posted on: February 20 2004 04:29 EST
Threaded Messages (2)
- Acesss Remote Server Folder by stephen smithstone on February 20 2004 08:22 EST
- Acesss Remote Server Folder by cnzeng zheng on February 22 2004 08:54 EST
-
Acesss Remote Server Folder[ Go to top ]
- Posted by: stephen smithstone
- Posted on: February 20 2004 08:22 EST
- in response to Venkata Nagendra Jalapati
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 -
Acesss Remote Server Folder[ Go to top ]
- Posted by: cnzeng zheng
- Posted on: February 22 2004 08:54 EST
- in response to stephen smithstone
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