I’m using System.console().readPassword() to read input from the console without echoing characters. This works find on OpenJ9 on my Mac terminal and when using QSHELL in a 5250 terminal. However when running via SSH to the IBMi it fails:

Exception in thread "main" java.io.IOError: java.io.IOException: Qyj9SetEcho failed
at java.io.Console.readPassword(Console.java:328)
at com.dpslink.scm.extend.Util.readLineFromConsole(Util.java:146)
at com.dpslink.scm.extend.CommandLineInterpreter.CommandImport(CommandLineInterpreter.java:87)
at com.dpslink.scm.extend.CommandLineInterpreter.main(CommandLineInterpreter.java:47)
Caused by: java.io.IOException: Qyj9SetEcho failed
at java.io.Console.echo(Native Method)
at java.io.Console.readPassword(Console.java:326)
... 3 more

IBMi Java being used:
java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 8.0.6.30 - pap6480sr6fp30-20210507_01(SR6 FP30))
IBM J9 VM (build 2.9, JRE 1.8.0 OS/400 ppc64-64-Bit Compressed References 20210415_469669 (JIT enabled, AOT enabled)
OpenJ9 - c2bc063
OMR - fa000e8
IBM - 8165371)
JCL - 20210419_01 based on Oracle jdk8u291-b09

Is this a known limitation or a bug? Google search came up with nil.

--
Marshall


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2021 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.