Skip to content

Commit

Permalink
Throw a more meaningful error when jna and jansi are not available on…
Browse files Browse the repository at this point in the history
… windows, #30
  • Loading branch information
gnodet committed Nov 4, 2016
1 parent 066491e commit c994055
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/org/jline/terminal/TerminalBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ else if (OSUtils.IS_WINDOWS) {
Log.debug("Error creating JNA based pty: ", t.getMessage(), t);
}
}
return new JansiWinSysTerminal(name, nativeSignals, signalHandler);
try {
return new JansiWinSysTerminal(name, nativeSignals, signalHandler);
} catch (NoClassDefFoundError e) {
throw new IllegalStateException("Unable to create a Windows based terminal " +
"because of missing dependencies. Add either JNA or JANSI to your classpath.", e);
}
} else {
Pty pty = null;
if (useJna()) {
Expand Down

0 comments on commit c994055

Please sign in to comment.