Maybe it's too late here (01:17) and I can't see the problem...
package com.codegym.task.task19.task1925;
/*
Long words
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
// args = new String[] {"/uploads/teszt.txt", "/myfiles/outputfile.txt"};
BufferedReader bfr = new BufferedReader(new FileReader(args[0]));
FileWriter fWr = new FileWriter(args[1]);
String[] line = null;
int linesCount = 0;
while (bfr.ready()) {
line = bfr.readLine().split(" ") ;
for (int i=0; i<line.length; i++) {
if ((i>0 || linesCount > 0) && line[i].length()>6) fWr.append(",");
if (line[i].length()>6) fWr.append(line[i]);
}
linesCount++;
}
bfr.close();
fWr.close();
}
}