ADC Home > Reference Library > Technical Q&As > Legacy Documents > Java >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
Q: What is JAR caching?
A: Java code is frequently stored on servers in a special type of file called a JAR (for Java Archive). If a Java applet uses many JARs, or if the JARs are very large, it can take considerable time for the browser to load these files. MRJ 2.2.3 greatly improves JAR caching.
Previous versions of MRJ had caching, but it was up to the
browser, and the cache was shared with HTML files. MRJ JAR caching
saves copies of these files on your local hard drive. When you use
a JAR again, MRJ checks to see if there is a newer version on the
server by sending a HTTP
MRJ cached JAR files are saved by default in a folder named "MRJ Cache" located in the System Preferences folder. Over time, this folder may grow in size, but by default, storage space will not exceed 100MB. If you want to reclaim some of this space, you can quit all running applications that use Java and then drag the "MRJ Cache" folder to the trash. The next time MRJ needs to cache a JAR file, it will create a new "MRJ Cache" folder.
Q: How do I change the default settings for JAR caching?
A: It is possible to change the default settings by modifying properties in the "mrj.properties" file. These properties can be set by adding a file called "mrj.properties" to the "lib" folder within the "MRJLibraries" folder (in the System Folder:Extensions folder). This file does not exist by default - it can be created and edited with any text editor.
Setting the property
The default values are in bold:
com.apple.mrj.cache.verbose.hit true/false Log cache hits to the Java console
com.apple.mrj.cache.logfile <path to log file> Log information to file instead of console.
com.apple.mrj.cache.directory <path to existing folder> Specify the location of the JAR cache folder.
[Oct 06 2000]