java - not able to Access files in shared dir on NFS -


i have enabled , shared dir through nfs on windows server 2012. using xfile library access not able access it. following code trying connect nfs.

import java.io.*; import java.net.*; import com.sun.xfile.*; import com.sun.nfs.*;  public class clientpro {  /**  * @param args command line arguments  */ public static void main(string[] args) {     try {            xfile xf = new xfile("nfs://172.25.16.211//nfs//abc.txt");            if (xf.exists())            {                     system.out.println("dir or file exist");                 if (xf.canread())                 {                         system.out.println("dir or file readable");                 }else{                     system.out.println("dir or file not readable");                 }             }else                 system.out.println("dir or file not exist");             } catch (exception e) {                 system.out.println(e);             }         }  } 

output of above code is: dir or file not exist


Comments