Is there a way to set the stream System.err so everything written to it is ignored? (i.e. discarded not outputted)
You can use System.setErr() to give it a PrintStream which doesn't do anything.
See @dogbane's example for the code.