167

I need to use mapview control in android and I can't seem to understand how to run keytool. Is it installed with eclipse? I can't seem to find a download link.

Thanks

0

10 Answers 10

207

keytool is part of the standard java distribution.

In a windows 64-bit machine, you would normally find the jdk at

C:\Program Files\Java\jdk1.8.0_121\bin

It is used for managing keys and certificates you can sign things with, in your case, probably a jar file.

If you provide more details of what you need to do, we could probably give you a more specific answer.

6
  • 2
    how can I use it? it is not available from the cmd propmp in windows
    – Amit Raz
    Jan 28, 2011 at 16:01
  • 2
    Your link points to the Java 1.3 (very old!) documentation. The docs for the Java SE 6 version are here: download.oracle.com/javase/6/docs/technotes/tools/solaris/…
    – Jesper
    Jan 28, 2011 at 16:01
  • 21
    @Amit if you have the JDK installed and added the bin folder of your JDK to the PATH you should be able to use the keytool.
    – Jesper
    Jan 28, 2011 at 16:02
  • 16
    Funny, the question is "where", not "what", is keytool... why was this even accepted.
    – Zoomzoom
    May 12, 2016 at 19:05
  • 2
    @Zoomzoom: Thought the same after ending up here. Edited the question to fix this.
    – Veverke
    Mar 1, 2017 at 10:22
205

keytool is a tool to manage (public/private) security keys and certificates and store them in a Java KeyStore file (stored_file_name.jks).
It is provided with any standard JDK/JRE distributions.
You can find it under the following folder %JAVA_HOME%\bin.

5
  • 11
    $JAVA_HOME/bin for Linux and friends
    – clapsus
    Jul 30, 2015 at 13:45
  • @evandrix When I open keytools.exe it keeps closing.
    – JayC
    Jan 23, 2017 at 16:09
  • It's not meant to be opened, it's a command line tool (and should close as soon as it prints whatever it prints initially).
    – milosmns
    Feb 11, 2018 at 16:20
  • Do not forget the double quotes, depending on your (Windows) configuration : "%JAVA_HOME%\bin\keytool"
    – SR_
    Mar 11, 2018 at 22:03
  • 1
    keytool is provided not only in JDK but also in JRE destribution which takes less disk space Jul 24, 2019 at 23:27
12

For me it turned out to be in c/Program Files/Java/jdk1.7.0_25/bin (Windows 8). A more general answer to this question is that it will most likely be in the bin sub directory of wherever your jdk is installed.

9

keytool it's a binary file into the JDK folder ... just add your JDK as environment variable by adding the following line

C:\Program Files\Java\jdk1.8.0_65\bin
6

If you are working with a Mac... the keytool is part of the Java SDK and can be found in the following location /System/Library/Java/JavaVirtualMachines/[VERSION].jdk/Contents/Home/bin/keytool

5

here: C:\Program Files\Java\jre7\bin it is an exe keytool.exe

4

It is in path/to/jdk/bin. Make sure that $JAVA_HOME is defined, and $JAVA_HOME/bin is added to $PATH, or else the 'keytool' command won't be recognized when called.

3

If you have Android installed in windows, you will also find it here: C:\Program Files\Android\jdk\microsoft_dist_openjdk_1.8.0.25\jre\bin

2

If you have java installed of course keytool is in there. What you need to do is to add it on your PATH variable.

2

For Android Studio users

If you have Android installed in windows, you will also find it here:

C:\Program Files\Android\Android Studio\jre\bin

Add this path in Enviourment variables and save it After then you can use keytool on your terminal/command prompt

Not the answer you're looking for? Browse other questions tagged or ask your own question.