File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Colored console output ?

 
Andy Jack
Ranch Hand
Posts: 257
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to make java code that displays multicolored output on the console ?
 
Steve Luke
Bartender
Pie
Posts: 4181
21
IntelliJ IDE Java Python
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no cross-platform way to do it. There are ANSI codes which work on Unix type systems, but they don't work on Windows. To get it to work on Windows you will need a library of some sort. A good Google search should help you find the ANSI codes and several libraries for Windows to choose from (maybe JAnsi or something like that? I forget, bu there are multiple).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic