The Artima Developer Community
Sponsored Link

Java Answers Forum
help needed for using Runtime.getRuntime().exec

20 replies on 2 pages. Most recent reply: Jul 1, 2005 5:17 PM by javafan13

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 20 replies on 2 pages [ « | 1 2 ]
Sujeevan Veerabomma

Posts: 8
Nickname: saijeevan9
Registered: Jun, 2005

Re: help needed for using Runtime.getRuntime().exec Posted: Jun 21, 2005 6:50 AM
Reply to this message Reply
Advertisement
Tested the code by inserting the lines u have given.
The output is:
str successfully retrieved
str: null

The variable is contaning null.So,it has not read the inputstream.

Thanks
Sujeevan

Sujeevan Veerabomma

Posts: 8
Nickname: saijeevan9
Registered: Jun, 2005

Re: help needed for using Runtime.getRuntime().exec Posted: Jun 22, 2005 4:11 AM
Reply to this message Reply
Hi ,

Did u get any clue for this ?Please help me out in this ...

Thanks
Sujeevan

Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: help needed for using Runtime.getRuntime().exec Posted: Jun 22, 2005 11:11 PM
Reply to this message Reply
Haven't had a chance to dig into it again.
Seems like a harsh one if its returning null
on the InputStream there should be a back and
forth communication as your Client communicates
with whatever telnet deamon, don't understand why
it would return a null. I'll try reading
from the input Stream via my own created
Buffers when I have a chance for now, I'm
just straight up puzzled.

I'm surprised that none of the brilliant cats
in our community have pitched in yet.

Sujeevan Veerabomma

Posts: 8
Nickname: saijeevan9
Registered: Jun, 2005

Re: help needed for using Runtime.getRuntime().exec Posted: Jun 23, 2005 2:05 AM
Reply to this message Reply
Hi ,

I will also be trying on this .Today is the last day for me to give solution for this, otherwise we may go for the apache API.

Thanks for ur help ... hope we get the solution with Runtime()....

Thanks
Sujeevan

Sujeevan Veerabomma

Posts: 8
Nickname: saijeevan9
Registered: Jun, 2005

Re: help needed for using Runtime.getRuntime().exec Posted: Jun 24, 2005 1:24 AM
Reply to this message Reply
Hi friend ,

Finally Iam using Apache API for doing the telnet .Iam not able to do with the Runtime().But please reply if u can do with taht .

Thanks and Regards
Sujeevan

javafan13

Posts: 4
Nickname: javafan13
Registered: Jun, 2003

Re: help needed for using Runtime.getRuntime().exec Posted: Jul 1, 2005 5:17 PM
Reply to this message Reply
Runtime.exec() is not a good choice anyway, provided that you have a choice. See
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4109888
if you have time for it. Or in two words: you can never know for sure how Runtime.exec() will react, nor if it will still work on any upgrade, patch and so on. It has only been added to the platform for cases when you don't have java implementation of the feature you need.

Flat View: This topic has 20 replies on 2 pages [ « | 1  2 ]
Topic: embedded jetty Previous Topic   Next Topic Topic: Applets - Phased out in the near future?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use