Q:

System.in.available() allways return a zero in windows 8

I'm trying to bring over my code from a mac to a windows 8 environment.
I'm using eclipse and was able to import the project ok. but 
when the code runs on my windows computer System.in.available() will allways return a zero.
I want my program to keep looping until a key is press.  This is what I have now, which works in apple but not windows in eclipse environment
} while(mEnd.compareTo("exit")!=0);

A:

If you are running the command line directly in an eclipse terminal window, this approach can help:
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

And use this BufferedReader to read lines rather than directly from System.in:
mEnd = br.readLine();

