Mar22-08, 12:38 PM
Hello. I am having some trouble getting a java program to work. I am supposed to make a program that takes a word and a file name, and finds all lines in that file that contain that word.
The word that I chose was "try", and the file was "Sgrep.java"
Here is the main method:
Did I do anything wrong that is not allowing the program to find the file? Because it is supposed to work.
I would appreciate any help,
This is important, I need this done by this weekend.
EDIT: I got it to work. The assignment sheet had given an example output that showed the file name as Sgrep.java, however, in order to get the program to recognize the file, I had to type in the entire target (C:\Users\User\Sgrep\src\sgrep\Sgrep.java). That is two hours of my life I'll never see again .
|Register to reply|
|Java: writing pictures to a file||Programming & Computer Science||1|
|how do display/generate webpage content with info from an array in a .java file?||Programming & Computer Science||1|
|problem about .java file and email||Computing & Technology||5|
|excel file won't open under java script tree menu||Computing & Technology||0|