1

I need SHA1 certificate fingerprint to get Google Map API key but when I enter

keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android 

in terminal it shows that keytool can be found in following packages

The program 'keytool' can be found in the following packages:
 * gcj-4.8-jre-headless
 * openjdk-7-jre-headless
 * gcj-4.6-jre-headless
 * openjdk-6-jre-headless
Try: sudo apt-get install <selected package>

the file keytool already exists in /usr/lib/jvm/jdk1.8.0_25/bin even though terminal displays this kinda message.

What's wrong with it?

I use Ubuntu 14.04 64-bit.

5
  • What is the result of which java and readlink -f /usr/bin/java? Jan 12, 2015 at 17:51
  • Java 8 is not in the 14.04 repositories, only Java 6 and 7, as you can see from the message. How did you installed Java 8? Jan 12, 2015 at 17:58
  • I have been using java 8 since 6 six months and I solved the problem by the way :) @HontváriLevente
    – Apurva
    Jan 12, 2015 at 18:21
  • Than it would be nice if you write down your solution, so if somebody finds this page, he get something valuable. Jan 12, 2015 at 21:01
  • Or at the very least delete this question, especially if you installed java in a non-standard way and won't be posting an answer
    – Xen2050
    Jan 13, 2015 at 5:35

1 Answer 1

3

/usr/lib/jvm/jdk1.8.0_25/bin isn't in $PATH.

Just use the full path to invoke it.

/usr/lib/jvm/jdk1.8.0_25/bin/keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
2
  • Also, the path can be /opt/jdk/jdk1.8.0_71/bin/keytool if you installed it with sudo
    – mladj0ni
    May 22, 2016 at 19:34
  • I am still getting same error. :( even if jdk is in opt and I used /opt/jdk/jdk1.8.0_71/bin/keytool My command is : /opt/jdk/jdk1.8.0_71/bin/keytool -list -v -keystore /home/htech22/Desktop/F/Flow/FlowKeystoreFile.jks -alias flow
    – Araju
    Oct 25, 2017 at 9:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .