Please support installing Java on Apple Silicon CPU
navrkald opened this issue · 3 comments
navrkald commented
When downloading npm-groovy-lint on Apple silicon CPU and doesn't have required Java version following error message is print:
Installing Java jre 14 in /Users/MyCensoredUserName/.java-caller..
VsCode Groovy Lint error: Unsupported architecture
Error: Unsupported architecture
I believe this is bug, since by documentation java should be automatically installed as part of npm-groovy-lint installation.
nvuillam commented
@navrkald this might be solved by latest njre & node-java-caller
Meanwhile, you can manually install java on your mac :)
Wayonb commented
@nvuillam This issue seems specific to ARM architecture. I having the similar issue even though Java 17 is installed as part of the docker image. The same docker image built on AMD64 doesn't have any issue.
docker run -it symbolplatform/build-ci:linter-ubuntu-lts bash -c "java -version;npm-groovy-lint"
openjdk version "17.0.8.1" 2023-08-24
OpenJDK Runtime Environment (build 17.0.8.1+1-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 17.0.8.1+1-Ubuntu-0ubuntu122.04, mixed mode, sharing)
Java jre or jdk 17 is required
Installing Java jre 17 in /root/.java-caller...
Unexpected error: Unsupported architecture
Error: Unsupported architecture
at Object.install (/usr/lib/node_modules/npm-groovy-lint/node_modules/njre/lib/install.js:204:32)
at JavaCaller.manageJavaInstall (/usr/lib/node_modules/npm-groovy-lint/node_modules/java-caller/lib/java-caller.js:257:43)
at async JavaCaller.run (/usr/lib/node_modules/npm-groovy-lint/node_modules/java-caller/lib/java-caller.js:88:13)
at async CodeNarcCaller.startCodeNarcServer (/usr/lib/node_modules/npm-groovy-lint/lib/codenarc-caller.js:277:28)
at async CodeNarcCaller.callCodeNarcServer (/usr/lib/node_modules/npm-groovy-lint/lib/codenarc-caller.js:105:22)
at async NpmGroovyLint.callCodeNarc (/usr/lib/node_modules/npm-groovy-lint/lib/groovy-lint.js:252:32)
at async NpmGroovyLint.run (/usr/lib/node_modules/npm-groovy-lint/lib/groovy-lint.js:68:13)
at async /usr/lib/node_modules/npm-groovy-lint/lib/index.js:12:9