3

I am running groovysh (groovy 4.0.8 which is installed by sdkman) on my Mac M1, and it raises a warning:

ansi will be disabled because an error occurred while installing ansi: Could not load library. Reasons: [no jansi in java.library.path: .... tried: '/private/var/folders/ck/2qcbfbs56075y7vsv6_yg6sr0000gn/T/libjansi-64-7439658586757684124.jnilib' (fat file, but missing compatible architecture (have 'x86_64,i386', need 'arm64')

It seems that it downloads a non-arm64 library. How to solve it?


Update: I find that it works if I specify jansi-2.4.0.jar in the classpath:

groovysh -cp /Users/xxx/.sdkman/candidates/groovy/4.0.8/lib/jansi-2.4.0.jar

It seems that groovysh's classpath does not contain the packages in lib.

I conducted the same installation steps on my Manjaro, and groovysh alone works well without specifying the jansi-2.4.0.jar. So, what did I miss on Mac M1? Is it a bug of groovysh or jansi?

chenzhongpu
  • 6,193
  • 8
  • 41
  • 79

0 Answers0