Nika Gamkrelidze Nika Gamkrelidze - 2 months ago 8
Java Question

I want my Java program to be able to run external application in Ubuntu

I want my Java program to be able to run external application in Ubuntu, but I don't know how.

Answer

The java.lang.Runtime.exec() family of static methods do everything you need. There is also the java.lang.ProcessBuilder class, which is basically a wrapper that helps you prepare calls to exec(). Finally, the java.awt.Desktop class will automatically open default system applications for various types of documents.

Comments