Originally Posted by
Norm
What does the posted code have to do with the problem of reading lines from a file? What is the setCMD array for?
You need to read the API doc for the Scanner class to see what methods it has for reading data from a file.
I suggest you break the problem up into several simple steps.
Read and print the lines in the file.
When that works, then search the lines as they are read for the one to be editted.
When that works, change the contents of the line.
Later worry about creating the new updated file, until later.
Do the above steps one at a time. Get each to work before moving to the next.