charlie mills wrote:
yeah it does run fine, it just wont find the .txt files
Not to nit pick too much, but in programming, detail and precision are very important. So your subject of "...my program won't run" is very different than what is actually happening which is that your program is failing. ;) It's just that that difference makes a huge difference in how to go about troubleshooting the problem. See the
Tell The Details FAQ for more info.
Based on the code you have, it is going to look for the txt files in whatever directory the program is started from (unless the
user.dir system property is getting set on the command line).
1. Are in the Ass_5 directory when you issue the run command? If not, try changing into that directory and see if it works.
2. I take it that the
run.bat file was provided to you by your teacher? Or did you write it?
I have to run to a meeting, so my next reply will be delayed. But someone else might be able to jump in and pick things up to help you.