I have a problem executing the following Java code on an MPE/iX 6.0
machine :
import java.io.*;
class MyJavaTest
{
public static void main(String args[])
{
String firstOne = getString("First one: ");
String secondOne = getString("Second one: ");
System.out.println("firstOne=" + firstOne);
System.out.println("secondOne=" + secondOne);
}
private static String getString(String prompt)
{
BufferedReader in = new BufferedReader(new InputStreamReader
(System.in));
if (prompt != null)
System.out.print(prompt);
String rString = "";
try
{ rString = in.readLine(); }
catch (Exception e)
{ rString = ""; }
return rString;
}
}
When I run this program, I get the "First one:" prompt as expected. When I
enter some data and the press the return key I don't get the second prompt.
I guess that the program is still in the first getString. When I run this
code on a PC, the program behaves normal. Has anybody seen this before? My
Java version is :
java full version "JDK 1.1.7B:03/20/99-09:03 (MPE Version A.17.03 GT JIT)"
Regards
Pascal Luyckx
Cheops technology nv
Jozef Verbovenlei 91
2100 Antwerp
Belgium
Phone: +32 3 366 50 30
Fax: +32 3 366 57 35