readline () devuelve nulo en Java

Estoy tratando de leer el stdin en mi programa Java. Espero una serie de números seguidos de nuevas líneas, como:

6  
9  
1  

Al proporcionar la entrada a través de la consola integrada eclipse, todo va bien. Pero cuando se usa la línea de comandos de Windows, el programa imprime:

Received '6'.  
Received 'null'.  
Invalid input. Terminating. (This line is written by another function that does an Integer.parseint()).  

Mi código es:

static String readLineFromStdIn(){  
try{  
        java.io.BufferedReader stdin = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));  
        String input = new String();  
        input = stdin.readLine();  
        System.out.println("Received '" + input + "'");  
        return(input);  
    }catch (java.io.IOException e) {  
        System.out.println(e);   
    }  
    return "This should not have happened";  
}  

¿Alguna pista

Respuestas a la pregunta(4)

Su respuesta a la pregunta