This error occurs while using the KeyTool because the native is using the OpenJDK and the tool needs to use the JDK that comes with Oracle.
1. View the JDK on your current machine:
1. View the JDK on your current machine:
rpm -qa | grep jdk
The result of the native query is openJDK
2. Uninstall the currently installed OpenJDK using Yum Remove.
3. Download the JDK for Linux on oracle’s official website.
4. Configure the environment variable vim /etc/profile locally and then modify the following:
export JAVA_HOME=/home/test/jdk1.8.0_131 (You need to replace it with your own jdk path.)
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME CLASSPATH PATH
5. Reload /etc/profile:
source /etc/profile
6. Review the JDK on the current machine and configure it.
7, re-use the keytool command, successful.
Read More:
- [Solved] Hbase-shell 2.x Error: Unhandled Java exception: java.lang.IncompatibleClassChangeError: Found class jline.Terminal…
- java: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x590
- [Solved] nacos Startup Error: nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error
- Java uses class array to report error Exception in thread “main” java.lang.NullPointerException solution
- [Solved] Swagger Startup Error: java.lang.NumberFormatException: For input string: ““
- [Solved] Flink1.12 integrate Hadoop 3.X error: java.lang.RuntimeException…
- keytool error java.io.IOException:keystore was tampered with,or password was incorre
- nested exception is java.lang.StackOverflowError [How to Solve]
- I/O error while reading input message; nested exception is java.io.IOException: Stream closed
- [Solved] Java.lang.BootstrapMethodError: call site initialization exception
- [Solved] Method threw ‘java.lang.StackOverflowError‘ exception. Cannot evaluate
- Mongodb java version 3.X, prompt “XXX (an encryption algorithm) is not available” when there is a user name and password
- [Solved] Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException
- [Solved] swagger Failed to start bean ‘documentationPluginsBootstrapper‘; nested exception is java.lang.NullP
- [Solved] nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
- [Solved] Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:
- Request processing failed; nested exception is java.lang.NullPointerException or UnsatisfiedDependencyE
- [Solved] Exception in thread “main“ java.lang.NoSuchFieldError: level
- [Solved] Failed to start bean ‘eurekaAutoServiceRegistration‘; nested exception is java.lang.NullPointerExce
- [Solved] MultipartException: Failed to parse multipart servlet request; nested exception is java.lang.Runtime