I have a question from one of the groups that are testing their application on one of our Redhat boxes. Could someone pls. review and provide some insight?
Issue running a java program. The program issues a:
int cmd;
while (true)
{
try{
cmd = System.in.read();
}catch(Exception e){
}
System.out.println("Read a command");
}
call. The call continuously returns a -1 (end of file). It only happens when I run the program FROM within a .sh file and have the program started up in the background. Any thoughts. It probably has something to do with a background process starting from a shell script is not getting assigned an input stream and the read call thinks it reached EOF, but it is only happening under Linux. So, any thoughts?
Your helpful tips would be highly valuable.
Thanks,
--Saadi
Java error: a-1 (EOF) in Linux
Java error: a-1 (EOF) in Linux
Aziz Khawaja
Chicago, Il.
Chicago, Il.