I am working on writing a console application that, depending on the menu item selected, pop open the user's web browser to a predefined URL. To achieve this, I am using the Desktop
class in the following way (abridged):
Desktop desktop = Desktop.getDesktop();
...
String path = "https://www.google.com/";
desktop.browse(URI.create(path));
The problem that I am having, is that the browse
method seems to print text to stdout / stderr, even though the URL has been opened properly; this messes with my console prompts.
How can I tell
Desktop.browse()
to not print anything to sdtout / stderr?
edit
This seems to be due to the fact that the managed OS that I am running has a wrapper around firefox, whose shebang is defined as #!/bin/bash -x
causing the script to execute verbosely.