Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8679005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:51:52+00:00 2026-06-12T20:51:52+00:00

I have created a Keystore using: keytool -genkey -keystore myKeyStore -alias myself and the

  • 0

I have created a Keystore using:

keytool -genkey -keystore myKeyStore -alias myself

and the password i have given is in Japanese i.e. “myPasswordは”
I am using the following code to load the keystore file

String KEYSTORE_FILE="C:/myKeyStore";//Path to the keystore file on disk.
PASSWORD="myPasswordは";//Password

KeyStore.getInstance("JKS").load(new FileInputStream(KEYSTORE_FILE),PASSWORD.toCharArray());

The above throws the following exception:
java.io.IOException: Keystore was tampered with, or password was incorrect.

If i create the keystore using an english password and use the same in code then it works fine.

Initially I created the keystore using the command:
keytool -genkey -keystore myKeyStore -alias mks
this will prompt me for the password which i enter as myPasswordは and then i enter the subsequent details. In this case, the code generates the above exception.

The interesting thing is that if i create the keystore using :
keytool -genkey -keystore myKeyStore -alias mks -storepass myPasswordは
then the code that i have given above works fine. I am using linux.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:51:53+00:00Added an answer on June 12, 2026 at 8:51 pm

    The root cause of this problem is that the keytool utility does not decode a non-ascii password entered at prompt correctly.

    This is a known issue which can be found at https://bugs.java.com/bugdatabase/view_bug;jsessionid=53546691146578386c644cb554976?bug_id=6433238

    So, the solution is to create a keystore with a password not entered at prompt. This can be done in the following way:

    keytool -genkey -keystore myKeyStore -alias myAlias -storepass すてきなパスワード

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a certificate basically straight from the keytool example page: keytool -genkey
I have a self-signed digital certificate created using java keytool command. Can I update
If I lost the original certificate.keystore file created with keytool, but have the exact
I created a keystore using keytool , but the thing is, we're using a
I have created the private signed keystore file using eclipse and I have released
When I validate a signature, that I have created before using the same keystore
I have created 3 classes as following Ext.mine.TextParent - Inherting from Textfield Ext.mine.child.TextChildA -
I have created an android application that calls (using kSOAP library) a SOAP based
I have created a keystore and created a apk file for version 1.0 of
I have forgotten my Keystore password and I don't really know what to do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.