How to use keytool in Oracle JDK 7 in ubuntu?

2020-06-28 11:03发布

问题:

I need a MD5 certificate to use in MapView in android. I have JDK 7 from Oracle installed. But running

keytool -v -list -alias alias_name -keystore my-release-key.keystore

is not giving me the result, instead it says to install openjdk. How to use the keytool in oracle jdk 7. And i am on ubuntu 12.04 64 bit.

回答1:

You can use keytool by doing this:

cd /usr/lib/jvm/jdk1.7.0/bin
./keytool -v -list -alias alias_name -keystore my-release-key.keystore

Keytool is not in your path by default, but it does not have to be in your path to be usable.



回答2:

Looks like your jdk installation has problems.

Check to see if you have any environment variables or path entries that are pointing to the wrong version of the JDK.