Depending on what you're trying to do, I think you may need an IO provider.
import org.openide.windows.IOProvider; import org.openide.windows.InputOutput; import org.openide.windows.OutputWriter; // Get an output window tab. InputOutput io = IOProvider.getDefault().getIO(TAB_NAME, false); io.select(); writer = io.getOut(); writer .println("Hello world\n"); Peter ________________________________ From: Karl Tauber <k...@jformdesigner.com> Sent: Thursday, January 20, 2022 5:27 AM To: dev@netbeans.apache.org <dev@netbeans.apache.org> Subject: Re: How to get output of System.out.println() in NB Output view? that's what I expect, but it does not show up in the Output window. When I create a simple Ant project app, it works. But when running NetBeans IDE from NetBeans, it does not. Karl Am 1/20/2022 um 12:18 PM schrieb Michael Bien: > it won't show up in the log view, however, if you start the platform > application or module with netbeans (e.g run project), it should be > visible in the output window (of the IDE, not from the app). > > -mbien > > On 20.01.22 10:26, Karl Tauber wrote: >> Hi, >> >> while working on improvements/fixes for FlatLaf support in NetBeans, >> I'd like to temporary add some System.out.println() to NetBeans core >> modules and see its output in the NetBeans Output view. But it does >> not show up. >> >> The printlns are compiled. I've checked it with the debugger. >> >> -J-Dnetbeans.logger.console=true did not help. >> >> The last lines in the Output view are: >> debug: >> nbbuild.tryme-debug: >> Searching for JARs in D:\Java\netbeans-apache\nbbuild\netbeans, this >> may take a moment... >> nbbuild.tryme-setup-debug-args: >> nbbuild.tryme: >> >> >> >> I'm using NetBeans 12.6 with Java 11 >> >> Any ideas? >> >> Thanks, >> Karl >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org >> For additional commands, e-mail: dev-h...@netbeans.apache.org >> >> For further information about the NetBeans mailing lists, visit: >> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org > For additional commands, e-mail: dev-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists