Skip to content

Commit

Permalink
java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no …
Browse files Browse the repository at this point in the history
…jansi64-1.12 in java.library.path, no jansi-1.12 in java.library.path, no jansi in java.library.path]
  • Loading branch information
ChristianSchulte committed Jun 13, 2016
1 parent 03e7a2a commit 823ee46
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions jansi/src/main/java/org/fusesource/jansi/AnsiConsole.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,34 @@
public class AnsiConsole {

public static final PrintStream system_out = System.out;
public static final PrintStream out = new PrintStream(wrapOutputStream(system_out));
public static final PrintStream out;

public static final PrintStream system_err = System.err;
public static final PrintStream err = new PrintStream(wrapOutputStream(system_err, STDERR_FILENO));
public static final PrintStream err;

private static int installed;

static
{
PrintStream jansiOut;
PrintStream jansiErr;

try
{
jansiOut = new PrintStream( wrapOutputStream( system_out ) );
jansiErr = new PrintStream( wrapOutputStream( system_err, STDERR_FILENO ) );
}
catch ( final UnsatisfiedLinkError e )
{
// Failure loading native library.
jansiOut = system_out;
jansiErr = system_err;
}

out = jansiOut;
err = jansiErr;
}

private AnsiConsole() {
}

Expand Down

0 comments on commit 823ee46

Please sign in to comment.