Published on: 20 September, 2016

keytool is not recognized as an internal or external command, operable program or batch file.

Posted by andy | 7643 views 1 likes 2 favourites 1 comments
Tumblr Digg Google Plus

If it is your first time learning to build android project, you may find an issue when try to generate a private key. This message keytool is not recognized as an internal or external command, operable program or batch file. may occur if the path of your java sdk has not been set globally.

There are two options you can do, the first easy option is by set the path of sdk java globally so you can run any executable file from the bin java folder. Click the window button and type in Environment Variables in the search program field bar.

A popup window will appear, there will be a button called Environment Variables


Click this button and look for the Path value in the System variables panel and then click the edit button. Enter your java sdk location at the end of the path value. Once you add this you should be able to use the keyword keytool.exe. For example the path of java SDK install can be like this.

C:\Program Files\Java\jdk1.7.0_79\bin

There will be a list of path entered this field, so make sure before you enter the path for the java sdk you enter a semicolon first.

The second option is to directly point the path of the keytool to java sdk installation folder, which in this case would be: C:\Program Files\Java\jdk1.7.0_79\bin.

Hopefully this helps for everyone that want to try developing mobile using Ionic and Cordova.

Sea Rothert
Commented on: 05 Feb, 2017 11:58:27 AM
In my case: I had to add a \ after bin for this to work
Write Comment
0 characters entered. Maximum characters allowed are 1000 characters.
Share your article with us and add your own google adsense account to earn extra money. Plus, you can promote a link back to your site.
Related Articles
Published on: 26 September, 2017
If you receive the following email with message Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description from Apple, it means you have not included a usage description in one of your cordova plugin. It happened to myself when I develop a cordova android app where it requires a Cordova Camera plugin. In the email, I received the following message The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data. It means when you install a plugin you have to include a variable parameter to pass the usage description.
Published on: 21 September, 2017
If you are new to Cordova and about to learn to program your first mobile app. You might want to know how to install, remove or view plugins for your app. So why you do need a plugin? Plugins in cordova is considered as a component or a module created to be used to access Native API of your phone. For example if you need to access your phone camera, you will need a camera cordova plugin which is cordova-plugin-camera. There are heaps of available plugin created by developers, you just need to try and test them so it works according to your need.
Published on: 18 September, 2017
This is the second part tutorial of our first ebook cordova tutorial. If you miss the first part of the tutorial, I would recommend you to read the first tutorial before continue reading this article. You can click the following link to read the first tutorial. As I promised, in this tutorial, you will learn how to package your ebook app into .apk file. The first thing you have to do is to configure your application configuration setting xml file. This configuration information is used by Cordova to package your application. The configuration xml file is located under the root folder named config.xml. If you open your config xml file using any text editor, you will have the following information.
Published on: 08 August, 2017
You will learn how to create your first android app using Cordova. The ebook will consists of 5 basic pages and will use AngularJS for the navigation, Slideout script for the menu navigation and Bootstrap template for the basic mobile layout.