adspace
Answer Posted / Sarvesh Kumar Gautam
To invoke an external process in Java, you can use the ProcessBuilder class. Here's a simple example:nn```javanProcessBuilder pb = new ProcessBuilder("command", "arguments");nProcess process = pb.start();n``` Replace `command` with the command you want to execute and `arguments` with any required arguments for that command.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a classloader in java?
How to sort array in descending order in java?
Is minecraft 1.15 out?
What is parsing in java?
What is an object in java and how is it created?
Write a program to find the whether a number is an Armstrong number or not?
Realized?
What is a constructor overloading in java?
What is the difference between equals() and == in java?
Differentiate between static and non-static methods in java.
What do you mean by an interface in java?
Explain public static void main(string args[]) in java.
explain different ways of using thread? : Java thread
How to create a base64 decoder in java8?
What are the differences between heap and stack memory in java?