Sta*_*bax 3 java file filenotfoundexception
在我的FileInputStream中我得到一个FileNotFoundException,但我知道他的文件存在,我可以用webbrowser下载它.
如果我将链接从异常复制到webbrowser,它也可以工作.对于每个人来说,RWX都有权利进行测试,但这没有用.
文件名中没有特殊标志......我不知道为什么会失败..
thx 4帮助!
编辑:
KeyStore ts = KeyStore.getInstance("PKCS12");
ts.load(new FileInputStream("http://192.168.1.1/ordner/myFile.p12"), passwKey);
KeyManagerFactory tmf = KeyManagerFactory.getInstance("SunX509");
tmf.init(ts, passwKey);
Run Code Online (Sandbox Code Playgroud)
出于安全原因,我更改了链接
你应该用
InputStream is = new URL("http://stackoverflow.com/").openStream();
Run Code Online (Sandbox Code Playgroud)
而不是FileInputStream.
| 归档时间: |
|
| 查看次数: |
2003 次 |
| 最近记录: |