Login
Remember
Register
Ask a Question
How will you invoke any external process in Java?
+1
vote
asked
May 5, 2021
in
JAVA
by
SakshiSharma
How will you invoke any external process in Java?
#invoke
external-process
java
Java-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 5, 2021
by
SakshiSharma
By Runtime.getRuntime().exec(?) method. Consider the following example.
public class Runtime1{
public static void main(String args[])throws Exception{
Runtime.getRuntime().exec("notepad");//will open a new notepad
}
}
...