File 从本地PC从网络部署的应用程序读取文件到InputStream
我试图通过网络部署的应用程序从本地PC读取文件。我一直收到File 从本地PC从网络部署的应用程序读取文件到InputStream,file,hadoop,networking,inputstream,local,File,Hadoop,Networking,Inputstream,Local,我试图通过网络部署的应用程序从本地PC读取文件。我一直收到FileNotFoundException。我正在使用hadoop文件系统。我想发送到输入流 InputStream inputStream = null; FileSystem fileSystem = FileSystem.getLocal(new Configuration()); inputStream = fileSystem.open(new Path("file:///c:/test.pdf")); 我在本地电脑上有一个文
FileNotFoundException
。我正在使用hadoop文件系统。我想发送到输入流
InputStream inputStream = null;
FileSystem fileSystem = FileSystem.getLocal(new Configuration());
inputStream = fileSystem.open(new Path("file:///c:/test.pdf"));
我在本地电脑上有一个文件,地址是c:/test.pdf
如果我在本地运行应用程序,我可以很好地运行它。但是,如果从网络部署的应用程序运行,我会收到:
java.io.FileNotFoundException:File文件:/c:/test.pdf不存在
有没有办法做到这一点