netbeans-platformnetbeans-11

How to get output from an ANT NetBeans Platform Application to be shown in Debugger Console


Our application is a NetBeans Platform Application built with ANT. Since we updated our application to NetBeans 11, the output (log messages, exceptions etc) are not shown in the Output window anymore and can only be found in var/log.

Creating a new ANT NetBeans Platform Application with ANT gives the same behavior, whereas creating one with Maven produces the expected output during debug.

Is it possible to get the ANT built NetBeans Platform Application to show output in the Output window?


Solution

  • I had the same issue, I assume you use Windows x64. You need to patch run.xml, a build script in the Netbeans_installation_directory/harness directory.

     <!-- architecture of jvm on which app will run -->
     <!-- ORIGINAL: condition property="jvm.arch.string" value="64" else="" -->
     <!-- BUG FIX: make sure jvm.arch.string=64, otherwise no log output on console on Windows with JDKx64! -->                
     <condition property="jvm.arch.string" value="64" else="64">
          <available file="${run.jdkhome}\jre\lib\amd64" />
     </condition>