A
A
Anton @ Lyalin2017-01-12 15:20:16
Java
Anton @ Lyalin, 2017-01-12 15:20:16

How to run an external application?

It is necessary to launch an external application from a Java project using

ProcessBuilder processBuilder = new ProcessBuilder(command);

Sending a command
string as
"firefox --new-window https://www.yandex.ru/search/?text="
, where after " = " there is a search word (any word), if you run the same thing through the command line, it starts normally, through the Java application, writes that there is no file or an invalid command.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton @ Lyalin, 2017-01-12
@toxa_1995

Thank you, I figured it out, three elements had to be driven in separately

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question