Problem description
Java is packaged and runs with Java-XMx1g-java.ext.dirs =lib2 Runner XX.
error: RSA premaster secret error
test has no problem, it can run locally and the result is correct; The server can run, but the results are incorrect. Report the above error.
Problem analysis
Java-cp XX. Jar YY is operational.
java-djava.ext.dirs will not run.
After java-java.ext.dirs loads the Lib, the JAR package under %JAVA_HOME%\ jRE \ Lib \ext will not load.
is queried, involving sunjce_provider.jar.
Solution 1
Find Sunjce, copy it to lib, and run the solution.
echo $JAVA_HOME
> find $JAVA_HOME -iname "*sunjce*jar" # find sunjce
/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext/sunjce_provider.jar
Just copy this into lib.
Solution 2
You just have to load the JAR package under Ext, otherwise it’s a problem.
for example: java-java.ext.dirs =lib:$JAVA_HOME/jre/lib/ ext-jar build/ myappjar.jar
conclusion
- cp makes use of the current jar package and the lib/ext directory jar package in the jre, -d does not. Copy the past jar
if necessary
Refer to the reference
https://stackoverflow.com/questions/21390157/rsa-premaster-secret-error
Read More:
- java.lang.IllegalStateException Exception: cause analysis and solution
- Cause analysis and solution of “SVN: e155009: failed to run the WC DB work queue associated with”
- Analysis and solution of common errors in ArcEngine development
- Recipe for target’Project 1.exe’ failed Cause analysis and solution
- Reset local git account and generate secret key
- Breaking Baidu’s secret of making money by reading
- A simple method of generating secret key by GIT and configuring SSH public key
- [Solved] RSA decrypt error: the data to be decrypted exceeds the maximum 128 bytes of this module
- Analysis of “RSL error 1 of 1”
- Analysis of JDBC connection to MySQL
- Error analysis of queryformap method of jdbctemplate
- Analysis of jitter using atop and perf
- SSH Login: RSA host key for 192.168.x.x has changed and you have requested strict checking. Host key
- Source code analysis of macOS startup process
- C#: Analysis of the difference between write() and writeline()
- Performance Clarke error grid analysis
- JS exception capture: the usage and example analysis of onerror() in window
- Bitcoin source code analysis – load Wallet
- Stix / taxii Threat Intelligence Analysis 2 (working mode)
- Online problem solving analysis