Weird problem with ISR and BR

Hi, i have been using ISR and BR for some time now, and it has been working fine.

But now, whenever i try to use ISR and BR, the program compiles but they do not work, as in if i try to accept a value with the correct syntax, the program executes and compiles fine, but it does not ask for a value.

If i copy and paste the exact same code from another program where the ISR and BR works, then it works in the new program too.

This is a small test class I made to test ISR and BR right now, and it does not open the terminal or give me an option to enter anything

import java.io.*;

publicclass Test

{

publicvoid display()throws IOException

{

InputStreamReader isr =new InputStreamReader(System.in);

BufferedReader br =new BufferedReader(isr);

String s = br.readLine();

System.out.println(s);

}

}

NOTE: In the above code, if i add a print statement like System.out.println anywhere, then it works fine - but why does this happen?

[1397 byte] By [Overkilla] at [2007-11-27 10:03:32]
# 1

> This is a small test class I made to test ISR and BR right now, and it does not open the terminal or give me an option to enter anything

Err, normally the terminal would be already open when running an app from the command line. On windows you have the choice of java.exe and javaw.exe, the latter one does not open a terminal. Use java.exe to run your program and it will always open a terminal.

-Kayaman-a at 2007-7-13 0:38:30 > top of Java-index,Java Essentials,Java Programming...