Tomcat on windows writes files to Windows\Temp
I am raising multiple Tomcat services on Windows, and sometimes getting ClassNotFoundException for no good reason. After some investigation it appears Tomcat is storing class files in windows temp dir, and is getting confused when several Tomcat instances are raised simultaneously.
Did anyone encounter this problem? How can we conf开发者_运维问答igure each Tomcat to write its temporary files in its own unique directory, thus avoiding the clash?
Note - the Tomcats are running as Windows Services on Windows Server 2008.
Try running Tomcat with -Djava.io.tmpdir=/my/temporary/directory
. Java uses it to determine the temporary directory. Assign separate temporary directories to separate Tomcat services.
精彩评论