The application jarsigner is not installed. It may be found in the following packages

I’ve updated my packages yesterday and now I wanted to sign an apk with jarsigner, but the terminal says it’s not installed. I’ve tried to reinstall jre-openjdk and java-environment-common, but it didn’t fix it.
The full error text:

The application jarsigner is not installed. It may be found in the following packages:
  extra/java-environment-common 3-5     /usr/bin/jarsigner
  extra/jdk-openjdk 19.0.2.u7-2         /usr/lib/jvm/java-19-openjdk/bin/jarsigner
  extra/jdk11-openjdk 11.0.18.u10-2     /usr/lib/jvm/java-11-openjdk/bin/jarsigner
  extra/jdk17-openjdk 17.0.6.u10-2      /usr/lib/jvm/java-17-openjdk/bin/jarsigner
  extra/jdk8-openjdk 8.362.u09-1        /usr/lib/jvm/java-8-openjdk/bin/jarsigner
Do you want to Install package java-environment-common? (y/N)
y
Executing command: pamac install java-environment-common
Preparing...
Warning: java-environment-common-3-5 is up to date -- skipping
Nothing to do.
Transaction successfully finished.

Try to search for it
(in zsh:)
print -l /**/jarsigner

/opt/eclipse-cpp/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_17.0.1.v20211116-1657/jre/bin/jarsigner
/opt/eclipse-cpp/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.linux.x86_64_19.0.1.v20221102-1007/jre/bin/jarsigner
/usr/bin/jarsigner
/usr/lib/jvm/java-8-openjdk/bin/jarsigner
/usr/lib/jvm/java-11-openjdk/bin/jarsigner
/usr/lib/jvm/java-17-openjdk/bin/jarsigner
/usr/lib/jvm/java-19-openjdk-bin/bin/jarsigner
/usr/lib/jvm/java-19-openjdk/bin/jarsigner
/usr/lib/jvm/java-20-openjdk/bin/jarsigner
/usr/share/doc/java-openjdk/api/jdk.jartool/com/sun/jarsigner
/usr/share/doc/java-openjdk/api/jdk.jartool/jdk/security/jarsigner

Maybe you need to set your java-version to default:
sudo archlinux-java set java-17-openjdk

https://wiki.archlinux.org/title/java

The command doesn’t return anything.
Also after browsing the folders and files, I found out that there’s no jarsigner file in the openjdk/bin folder.
I installed the official jdk and it has a jarsigner file in the bin folder, that I can use if I execute it through terminal with sudo ./jarsigner, however it’s a bit inconvenient to use like that. I preferred using the jarsigner command.

Again:

Maybe you need to set your java-version to default:
Something like:
sudo archlinux-java set java-17-openjdk

And please have a look at:

https://wiki.archlinux.org/title/java

(Wisdom lies in reading :wink: )

Then you have to reinstall your java !

This did nothing ! (skipping)

Use pamac or pacman !

Please repeat the update ! It seems something has not finished work.

See: https://stackoverflow.com/questions/12135699/where-is-jarsigner

1 Like

Setting back to default didn’t solve it, however reinstalling java did.
Thanks.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.