Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I call an external program in the java?

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
How can I call an external program in the java?

Ex: to call notepad.exe in the java
 
Philip Shanks
Ranch Hand
Posts: 189
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you are talking about accessing the exec() method of the java.lang.Runtime class. Below is a bit of example code that should do what you are describing. Please note that I am working on a Linux system, and used "rxvt" as my system call. You should be able to substitute "notepad.exe" for this without much trouble.
Please check the API documentation for more details.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic