0

Windows Server 2012 で NFS 経由でディレクトリを有効にして共有しました。Xfile ライブラリを使用してアクセスしましたが、アクセスできません。以下は、NFS に接続しようとしているコードです。

import java.io.*;
import java.net.*;
import com.sun.xfile.*;
import com.sun.nfs.*;

public class ClientPro {

/**
 * @param args the 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 is Readable");
                }else{
                    System.out.println("DIR or File is Not Readable");
                }
            }else
                System.out.println("DIR or File not Exist");
            } catch (Exception e) {
                System.out.println(e);
            }

       }
 }

上記のコードの出力は次のとおりです: DIR またはファイルが存在しません

4

0 に答える 0