观看自:某大佬
在Tomcat的bin目录下找到catalina.sh,用编辑器打开
找到如下代码
set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%"
rem Register custom URL handlers
rem Do this here so custom URL handles (specifically 'war:...') can be used in the security policy
set "JAVA_OPTS=%JAVA_OPTS% -Djava.protocol.handler.pkgs=org.apache.catalina.webresources"
加上-Djava.security.egd=file:/dev/urandom
set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%"
rem Register custom URL handlers
rem Do this here so custom URL handles (specifically 'war:...') can be used in the security policy
set "JAVA_OPTS=%JAVA_OPTS% -Djava.protocol.handler.pkgs=org.apache.catalina.webresources" -Djava.security.egd=file:/dev/urandom
关于这个方法的原理:http://hongjiang.info/jvm-random-and-entropy-source/