remkop / picocli-jansi-graalvm Goto Github PK
View Code? Open in Web Editor NEWWorkaround for issues that prevent Jansi from showing colored output in Windows GraalVM native images
License: Apache License 2.0
Workaround for issues that prevent Jansi from showing colored output in Windows GraalVM native images
License: Apache License 2.0
Is this library compatible with Jansi 2? If yes, what does that mean for GraalVM compatibility? It looks like Jansi 2 already provides some level of native support. Is then this picocli-jansi-graalvm
wrapper still required?
Hello, I am using quarkus
+ picocli
to build a cli program, thank you for providing such a good tool. Now I have also encountered the problem of no ANSI color under Windows.
I introduced jansi-2.2.0
and picocli-jansi-graalvm-1.2.0
, then generated and configured jni-config.json
and resources-config.json
, but when build a native image under Windows, always throw the exception: Method org.fusesource.jansi.internal.CLibrary.access$000() not found.
.
Cloud you tell me if there is a problem with my way of use? The exception log as follows:
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] C:\graalvm-java11\bin\native-image.cmd -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Duser.language=zh -J-Dfile.encoding=UTF-8 -H:JNIConfigurationFiles=jni-config.json -H:ResourceConfigurationFiles=resources-config.json --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy\$BySpaceAndTime -H:+JNI -H:+AllowFoldMethods -jar minpack-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-UseServiceLoaderFeature -H:+StackTrace minpack-runner
[minpack-runner:12712] classlist: 2,100.82 ms, 0.96 GB
[minpack-runner:12712] setup: 264.12 ms, 0.96 GB
Error: Error parsing JNI configuration in jar:file:/D:/code/cdpt/effect/packit/minpack/target/minpack-native-image-source-jar/minpack-runner.jar!/META-INF/native-image/picocli-jansi-graalvm/jni-config.json:
Method org.fusesource.jansi.internal.CLibrary.access$000() not found. To allow unresolvable reflection configuration, use option -H:+AllowIncompleteClasspath
Verify that the configuration matches the schema described in the -H:PrintFlags=+ output for option JNIConfigurationResources.
com.oracle.svm.core.util.UserError$UserException: Error parsing JNI configuration in jar:file:/D:/code/cdpt/effect/packit/minpack/target/minpack-native-image-source-jar/minpack-runner.jar!/META-INF/native-image/picocli-jansi-graalvm/jni-config.json:
Method org.fusesource.jansi.internal.CLibrary.access$000() not found. To allow unresolvable reflection configuration, use option -H:+AllowIncompleteClasspath
Verify that the configuration matches the schema described in the -H:PrintFlags=+ output for option JNIConfigurationResources.
at com.oracle.svm.core.util.UserError.abort(UserError.java:68)
at com.oracle.svm.hosted.config.ConfigurationParserUtils.doParseAndRegister(ConfigurationParserUtils.java:138)
at com.oracle.svm.hosted.config.ConfigurationParserUtils.lambda$parseAndRegisterConfigurations$3(ConfigurationParserUtils.java:119)
at java.base/java.util.stream.ReferencePipeline$4$1.accept(ReferencePipeline.java:212)
at com.oracle.svm.hosted.config.ConfigurationParserUtils$1.tryAdvance(ConfigurationParserUtils.java:108)
at java.base/java.util.Spliterator.forEachRemaining(Spliterator.java:326)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:734)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.IntPipeline.reduce(IntPipeline.java:491)
at java.base/java.util.stream.IntPipeline.sum(IntPipeline.java:449)
at com.oracle.svm.hosted.config.ConfigurationParserUtils.parseAndRegisterConfigurations(ConfigurationParserUtils.java:125)
at com.oracle.svm.jni.access.JNIAccessFeature.afterRegistration(JNIAccessFeature.java:126)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$setupNativeImage$11(NativeImageGenerator.java:849)
at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:70)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:849)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:561)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:476)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Error: Image build request failed with exit status 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.209 s
[INFO] Finished at: 2021-02-05T13:24:59+08:00
[INFO] ------------------------------------------------------------------------
Some environmental information:
quarkus
: 1.10.0picocli
: 4.6.1jansi
: 2.2.0picocli-jansi-graalvm
: 1.2.0A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.