Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-1846

Netbeans can't print out colored text in the output window

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 10.0
    • None
    • None

    Description

      public class TestConsole {

      @Test
      public void test() throws Exception

      { String ANSI_RESET = "\u001B[0m"; String ANSI_RED = "\u001B[31m"; System.out.println(ANSI_RED + "XX"); System.out.flush(); System.out.println(ANSI_RESET); System.out.println("\033[31;1mHello\033[0m, \033[32;1;2mworld!\033[0m"); System.out.println((char) 27 + "[32m" + "ERROR MESSAGE IN GREEN"); System.out.println((char) 27 + "[33mYELLOW"); System.setProperty("jansi.passthrough", "true"); System.out.println(ansi().fg(RED).a("Hello").fg(GREEN).a(" World").reset()); }

      }

       

      <dependency>
      <groupId>org.fusesource.jansi</groupId>
      <artifactId>jansi</artifactId>
      <version>1.17</version>
      <scope>test</scope>
      </dependency>

       

      Tried Maven 3.3.9, 3.5.3, 3.6.0

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            mcheung63 Peter
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: