The Artima Developer Community
Sponsored Link

Java Answers Forum
Runtime.getRuntime().exec()

1 reply on 1 page. Most recent reply: Jan 21, 2009 11:44 AM by George B

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 1 reply on 1 page
scandalous kk

Posts: 1
Nickname: scandalous
Registered: Jan, 2009

Runtime.getRuntime().exec() Posted: Jan 21, 2009 6:44 AM
Reply to this message Reply
Advertisement
Hello

Im getting an problem with Runtime.getRuntime..
Though its executing without any error, its does not do the desired function..
my test.sh echo`s a statement, but it doesn`t print anything

My code is here
System.out.println("hai");
Process proc=Runtime.getRuntime().exec("sh test.sh");
System.out.println("hai");


George B

Posts: 24
Nickname: hmgeorge
Registered: Feb, 2008

Re: Runtime.getRuntime().exec() Posted: Jan 21, 2009 11:44 AM
Reply to this message Reply
Here's an article that talks about how to read the input stream of the process in order to display its output: http://www.java-tips.org/java-se-tips/java.util/from-runtime.exec-to-processbuilder.html

Flat View: This topic has 1 reply on 1 page
Topic: Is it feasible to build Tile Base Game Engine using Java ? Previous Topic   Next Topic Topic: Virtual Conference on Agile Development

Sponsored Links



Google
  Web Artima.com   

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