The Artima Developer Community
Sponsored Link

Java Answers Forum
invoke shell script file from java source

1 reply on 1 page. Most recent reply: Aug 23, 2002 9:53 PM by Prasanna

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
Prashant sharma

Posts: 1
Nickname: pnm
Registered: Aug, 2002

invoke shell script file from java source Posted: Aug 17, 2002 2:31 AM
Reply to this message Reply
Advertisement
hi
i am new in this forum .i want to invoke shell script file form java .how can i invoke that file..
please reply me ASP

pnm


Prasanna

Posts: 11
Nickname: pras
Registered: May, 2002

Re: invoke shell script file from java source Posted: Aug 23, 2002 9:53 PM
Reply to this message Reply
Runtime rt=Runtime.getRuntime();
Process p=rt.exec("YouScript.sh")
The above piece of code should be within a try -catch block.Hope it helps.

Flat View: This topic has 1 reply on 1 page
Topic: which kind of code can access class variables Previous Topic   Next Topic Topic: Beginner in Trouble

Sponsored Links



Google
  Web Artima.com   

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