Hello,
I have a script beanshell "script.bsh" like this :
 
    String line;
    String fileName = "C:\\file.txt";
    try  {
        BufferedReader br = new BufferedReader(new FileReader(fileName)); 
        while ( (line = br.readLine())!=null) {
            print(line);
        }
        br.close();
    }
    catch(Exception e)  {}
 
I would like to know how can I execute my script line by line, because
when I execute my script like this :
   
    BufferedReader bufferedreader = new BufferedReader(new FileReader(fileName));
    while ((command = bufferedreader.readLine()) != null) {
        Object returnValue = interpreter.eval(command);
    }
 
I have an error message
"In file: <Inline eval of: while(! eofInputFile(inputFile)) { ;
> Encountered "<EOF>" at line 1, column 34".
 
But, when I execute my script like this  :
    interpreter.source(fileName);
I have no error.