This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Opening an external program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Opening an external program" Watch "Opening an external program" New topic
Author

Opening an external program

Randy Miller
Ranch Hand

Joined: Feb 13, 2012
Posts: 44
Hi guys!

So,basically I am developing an application, working with XML. Now I am trying to figure out a way to open an external program on my laptop, in this case UltraEdit, via Eclipse, as soon as I click on a button in my GUI. And it would be even better if I knew how to directly open a file with this external program, cklicking on my button.
I searched for some time on the internet but I just couldn´t find the right solution.
Would be awesome if one of you could help ;)

Greetings,

Randy
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3068
    
  33

There have been similar queries here before, you can search for Runtime.getRuntime() And there another important article explaining the pitfalls of Runtime.exec().

You can also look at Apache Commons Exec API which wraps around the Java implementation.


Mohamed Sanaulla | My Blog
Randy Miller
Ranch Hand

Joined: Feb 13, 2012
Posts: 44
Hi Mohamed!

Thanks for your reply!I figured it out and it works just fine
Here,for everybody who´s interested:

 
wood burning stoves
 
subject: Opening an external program
 
Similar Threads
Eclipse IDE and JDK
Help Info.
handling external javascript in HttUnit
For avoiding OutOfMemoryException
Applet Button