I solved this first by copying out the Trivial IOProvider class but then I instantiated the original class with reflection.
https://github.com/trixon/almond/blob/0773bc1ba81dfc3d26846aa6af5a364a8374f11f/nbp/src/main/java/se/trixon/almond/nbp/NbHelper.java#L70 /Patrik Den tors 11 juli 2024 kl 11:39 skrev Patrik Karlström <pat...@trixon.se>: > Hello, > I have this platform application that uses IOProvider to output text. > > When started with --nogui or before gui is present there is no output when > using the IOProvider. > > The doc below sounds promising but how do I ensure/enforce the use of the > fallback instance? > > Can I delete the default from the lookup? > > public static IOProvider getDefault() > Get the default I/O provider. > Normally this is taken from Lookup.getDefault() but *if there is no > instance in lookup, a fallback instance is created which just uses the > standard system I/O streams.* This is useful for unit tests and perhaps > for standalone usage of various libraries. > > > https://bits.netbeans.org/dev/javadoc/org-openide-io/org/openide/windows/IOProvider.html#getDefault-- > > /Patrik >