MIDRANGE dot COM Mailing List Archive



Home » JAVA400-L » September 2009

How to resolve the problem with Runtime.getRuntime().exec returning EBCDIC data when running on iseries



fixed

I've created a class that will use the Runtime.getRuntime().exec to execute
a command on iseries when instantiated. Once the command is sucessfully
executed, it then reads the Process.getInputStream() to get the result.

I've found that reading of the Process.getInputStream() works fine if the
class is instatiated from a PC. However, it failed to read
Process.getInputStream() data correctly when the class is instatiated from
iseries. I then added some codes the print the read result in hex and,
appearantly, when the class is instantiate from iseries, the result is sent
back in EBCDIC encoding format and the BufferedReader is attempting to read
it as ASCII. Well, that ain't going to work :(.

Has anyone encountered this problem before? How can I resolve this so that
this class can be run on both iseries and PC?











Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact