---
# Copyright (C) 2009, Progress Software Corporation and/or its 
# subsidiaries or affiliates.  All rights reserved.
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

title: Home
in_menu: true
sort_info: 1
--- name:overview pipeline:haml,tags

%h1 Home
{project_slogan:}

--- name:content pipeline:haml,tags

.left
  %h1 What is Jansi?
.right
  :markdown
    Jansi is a small java library that allows you to use ANSI escape sequences 
    to format your console output which works even on windows.  

    Using jansi is easy.  Before you start sending ANSI escape sequences to
    `System.out` make sure you run:
        
  :plain
    {coderay::java}
    AnsiConsole.systemInstall();
    {coderay}

  :markdown
    If you would rather not mess with the System.out settings, you can use the
    `AnsiConsole.out` PrintStream instead.  For example:
    
  :plain
    {coderay::java}
    AnsiConsole.out.println("Hello World");
    {coderay} 
    
.left
  %h1 Windows Examples
.right
  :markdown
    Most unix terminals support rendering ANSI escape sequences when Java
    sends them via `System.out` but when this is done on Windows, they 
    don't get interpreted and you get garbage on the console similar to:
    
    ![before](images/before-windows.png)
  
    If the application uses the jansi libary, things start to look
    much better:
    
    ![after](images/after-jansi-windows.png)
    
    
    