I have a utility which detects DB Vendor name from the configuration file. it is working fine but we have one .ini file for output redirection for this utility.
if i use this utility as cfgtest -v DB_VENDOR > CON:
where CON: is for console redirect.
how could I read this data using java?
my old code is working fine without output redirection.
String db_vendor = null;
_Shell shell = new _Shell();
/*
* Parse config.cfg file in order to get Database Vendor.
*/
String command = "cfgtest -v DB_VENDOR";
int dstat = shell._execCommand( command );
String str = shell._getCommandOutput();
// VALUE(S): DB_VENDOR=ORA
String [] st = str.split( "=" );
db_vendor = st[1].trim();
return db_vendor;