File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Question about installing Jansi to use with Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Question about installing Jansi to use with Java" Watch "Question about installing Jansi to use with Java" New topic
Author

Question about installing Jansi to use with Java

Lainey Bonetto
Greenhorn

Joined: Aug 24, 2012
Posts: 3
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

Joined: Jan 10, 2002
Posts: 60997
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Lainey Bonetto
Greenhorn

Joined: Aug 24, 2012
Posts: 3
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

Joined: Jan 10, 2002
Posts: 60997
    
  65

I assume you'd just place the jar in the class path like any other.
Lainey Bonetto
Greenhorn

Joined: Aug 24, 2012
Posts: 3
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.
 
Consider Paul's rocket mass heater.
 
subject: Question about installing Jansi to use with Java