To clear the Java cache on a Mac OSX desktop, server, or laptop, you can do the following:
1. Open Finder
2. Go to Applications
3. Click on the Utilities folder
4. Click on Java Preferences
5. Next the Java Preferences window will open. Select Delete Files under the General tab.
6. In the Delete Temporary Files window make sure all boxes are checked and then select OK.
When it’s done, the Java cache has now been cleared.