@@ -60,26 +60,27 @@ public String getMenuTitle() {
6060 }
6161
6262private int listenOnProcess (String []arguments ){
63- try {
64- final Process p =ProcessUtils .exec (arguments );
65- Thread thread =new Thread () {
66- public void run () {
67- try {
68- String line ;
69- BufferedReader input =new BufferedReader (new InputStreamReader (p .getInputStream ()));
70- while ((line =input .readLine ()) !=null )System .out .println (line );
71- input .close ();
72- }catch (Exception e ){}
73- }
74- };
75- thread .start ();
76- int res =p .waitFor ();
77- thread .join ();
78- return res ;
79- }catch (Exception e ){
80- return -1 ;
63+ try {
64+ final Process p =ProcessUtils .exec (arguments );
65+ Thread thread =new Thread () {
66+ public void run () {
67+ try {
68+ InputStreamReader reader =new InputStreamReader (p .getInputStream ());
69+ int c ;
70+ while ((c =reader .read ()) != -1 )
71+ System .out .print ((char )c );
72+ reader .close ();
73+ }catch (Exception e ){}
74+ }
75+ };
76+ thread .start ();
77+ int res =p .waitFor ();
78+ thread .join ();
79+ return res ;
80+ }catch (Exception e ){
81+ return -1 ;
82+ }
8183 }
82- }
8384
8485private void sysExec (final String []arguments ){
8586Thread thread =new Thread () {