As @Maba said we can not use Input redirection operator (any redirection operator) in eclipse/intellij as there no shell but you can simulate the input reading from a file through stdin like the below
InputStream stdin = null;
try
{
stdin = System.in;
//Give the file path
FileInputStream stream = new FileInputStream("SomeTextFile.txt");
System.setIn(stream);
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
while ((line = br.readLine()) != null) {
System.out.println(line);
}
br.close();
stream.close()
//Reset System instream in finally clause
}finally{
System.setIn(stdin);
}