It's not a secret anymore!*
The moose likes Beginning Java and the fly likes ERROR - Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ERROR - "system cannot find the file specified"" Watch "ERROR - "system cannot find the file specified"" New topic

ERROR - "system cannot find the file specified"

Peter Kolozvary

Joined: Sep 06, 2008
Posts: 6
I'm not sure why I'm getting this error.

The compile file option produces no errors, however when I got to run the program, it spits out the error:"system cannot find the file specified".

I've even moved the file around and the system still can't find it. Any thoughts?

Here is my code along with the error message:

marc weber

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Peter Kolozvary:
// Open the Transactions file.
File file = new File("D:/Trasactions.txt");

Do you see a typo?

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
I agree. Here's the link:
subject: ERROR - "system cannot find the file specified"
Similar Threads
Eclipse, won't read text file.
The system can only find one of the two files specified
Scanner class
While Loop Error
Reading and converting only one line to String and storing it in an array