HP3000-L Archives

March 2000, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Pascal Luyckx <[log in to unmask]>
Reply To:
Pascal Luyckx <[log in to unmask]>
Date:
Wed, 8 Mar 2000 09:19:26 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (49 lines)
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

ATOM RSS1 RSS2