云服务器启动tomcat非常慢(2)

云服务器,启动tomcat超级慢,经常卡在类似:
Root WebApplicationContext: initialization completed in xxxx ms

Deploying web application directory.
后面要等好久,才会执行。

直接呈上解决办法:

$ echo $JAVA_HOME
$ cd $JAVA_HOME/jre/lib/security/
$ vi ./java.security 

找到securerandom.source这项,修改random为urandom:

securerandom.source=file:/dev/urandom

你可能感兴趣的:(tomcat,jre)