• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about installing Jansi to use with Java

 
Lainey Bonetto
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm supposed to create a simple program to run in a console for my Java class. The computers that it will be shown on are running Windows. I could really impress my professor if I included some color in the output.

Based on my searches, I'll need to download a library to accomplish this. It looks like Jansi is pretty straight-forward to use, but the instructions for installing seemed to be lacking (especially since I'm a newb).

After I download the .jar file, what do I do? I assume I double click on it to install and then include "import org.fusesource.jansi.AnsiConsole;" in my file. Is it that easy? Or am I missing some steps.

Thanks for any help!



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lainey Bonetto wrote:I could really impress my professor if I included some color in the output.

If one of my students did this above and beyond the requirements of an assignment, I'd be less than impressed. I'd suggest just sticking to the assignment.
 
Lainey Bonetto
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I appreciate your thoughts. Normally I'd stick to the assignment with any other professor, but I've had two other programming classes with him and know that he'd be pleased with the extra effort.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume you'd just place the jar in the class path like any other.
 
Lainey Bonetto
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was able to get Jansi to work and I thought I'd share my solution in case anyone did a search here.

The file that you download can simply be placed in your jre/lib/ext folder and use the import statement shown above. No other contortions are necessary.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic