Ask your own question, for FREE!
Computer Science 69 Online
OpenStudy (mateeldaa):

I wrote a java program that takes input from a file and writes it to another file, but my program is saying that the file cannot be found. Any suggestions? My file is saved under the src file.

OpenStudy (anonymous):

What IDE are you using?

OpenStudy (bibby):

assuming eclipse, it should be fine in the project folder. for example imagine a project using 10 text files named BabyNames(2001-2010).txt the hierarchy could look something like, and could be used like so: ``` Scanner sc = new Scanner(new File("Babynamesranking2004.txt")); ```

OpenStudy (bibby):

OpenStudy (mateeldaa):

hey y'all, sorry. I was using NetBeans and the file path was FileInputStream("textin.txt")

OpenStudy (bibby):

not really sure, never used netbeans. try making sure it's in the project folder by dragging "testin" to the project folder (for example in this screenshot http://jcop.sourceforge.net/images/user/netbeans-add-jar.png it'd be JcopTest)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!