gpt4 book ai didi

java - Java中InputStream的FileInputStream

转载 作者:行者123 更新时间:2023-12-02 01:08:29 24 4
gpt4 key购买 nike

这是打开“mat1.txt”文件的正确方法吗,因为 Eclipse IDE 出现错误?

InputStream fstream = new FileInputStream("C:\\eclipse-workspace\\edu\\iitd\\col1062020\\mat1.txt");

错误:

Unhandled exception type FileNotFoundException

从错误中,它无法找到该文件,但我已将其放置在提供的路径中。 (见下文)

File location

是否是C盘访问权限的问题?

最佳答案

我看到您编写了 eclipseworkspace,但在路径中有一个减号:eclipse-workspace

关于java - Java中InputStream的FileInputStream,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59720536/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com