public class Workaround
extends java.lang.Object
This class provides a workaround for a problem in Jansi's
org.fusesource.hawtjni.runtime.Library
that prevents the native libraries embedded in the Jansi JAR in
/META-INF/native/* from being loaded
when running in a GraalVM native image.
Usage: call Workaround.enableLibraryLoad() before calling any Jansi code.
For example:
import org.fusesource.jansi.internal.WindowsSupport;
import picocli.jansi.substratevm.Workaround;
public class OtherApp {
static {
Workaround.enableLibraryLoad();
}
public static void main(String[] args) {
int width = WindowsSupport.getWindowsTerminalWidth();
doCoolStuff(width);
}
// ...
}
| Modifier and Type | Method and Description |
|---|---|
static void |
enableLibraryLoad() |