We help IT Professionals succeed at work.

Can i delete the system cache folder under Application Data\Sun\Java\Deployment\cache ?

drussoli asked
I have 3 terminal servers and all user are experiencing the same problem.  User profile storage has been exceeded.  It seem that the C:\Documents and Settings\user\Application Data\Sun\Java\Deployment\SystemCache\6.0 has alot of large files.  I can delete the large files and the user can continue working.  But since I have over 300 users and 3 terminal servers, I am getting calls every day.  Is there an easier way to fix this for all users?

Watch Question

Sr. Systems Engineer
This is a java problem not an MS one... but anyway.. you could put a delete batch file in the startup group for each user that deletes that users cache if deleting it doesn't cause problems- below is an example name it delfiles.bat or something and put it in the all users stat menu start up folder.. example below set to whatever path you want and each time a user logs in it will clear theirs.

DEL "%USERPROFILE%\app data\whatever path\*.*" /Y /S

I created a script to do this:

Check for the existence of a readme file
if it doesn't exist - pipe out the following settings to the deployment.properties file which will disable caching and also set max cache size to 1MB (were it ever enabled)

if not exist ...
echo deployment.cache.max.size=1 >>"[path]\%username%\Application Data\Sun\Java\Deployment\deployment.properties"
echo deployment.cache.enabled=false >>"[path]\%username%\Application Data\Sun\Java\Deployment\deployment.properties"
rmdir "[path]\%username%\Application Data\Sun\Java\Deployment\cache" /s /q
echo The existance of this readme means that your java temporary files are not being cached >>"[path]\%username%\Application Data\Sun\Java\Deployment\readme.txt"