Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

INFO: MRJ 2.2.3, JAR Caching, and Macintosh Manager



Starting in Apple MRJ 2.2.3, Apple introduced JAR Caching into the MRJ.

From the TIL article located at
http://til.info.apple.com/techinfo.nsf/artnum/n75097

JAR caching
MRJ 2.2.3 introduces JAR caching. 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
to load these files. 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. If not, it uses the local copy, and your application
starts up much faster than it would without caching.

JARs are saved in a folder named "MRJ Cache" located in
"System:Preferences". Over time, this folder will grow, but it will not
exceed 100MB. If you want to reclaim some of this space, you can quit all
running applications 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.

If this is the case, then there is the potential for the JARs to suck up a
LOT of server storage space, especially since the JAR cache directory can
store up to 100MB.

The MRJ will run under OS 8.1 and OS 8.6, meaning that this directory might
be copied at every login and logout along with the other preferences.

The solution?

According to the MRJ JAR Caching FAQ at
http://developer.apple.com/qa/java/java27.html

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 com.apple.mrj.cache.size to 50M represents a JAR cache
size of 50MB. You may set this value larger or smaller as needed. To disable
JAR caching, set the property com.apple.mrj.useJarCaching to false. If a
cache directory is specified with the property
com.apple.mrj.cache.directory, the directory must exist or JAR caching will
be disabled. The JAR cache options are sensitive to trailing spaces and MRJ
provides no error checking on property values.

Enjoy!

Scott Barber

--
Scott Barber email@hidden | Want Apple Education info?
Systems Engineer | www.apple.com/education/
Apple Computer, Inc. | For Product Questions:
Pennsylvania K-12 | www.apple.com/support/
888-609-9081 |K-12 Hotline: 1-800-800-2775

Engineer by trade, educator at heart.

"I cannot join the space program and restart my life as an astronaut, but
this opportunity to connect my abilities as an educator with my interests in
history and space is a unique opportunity to fulfill my early fantasies."

-Christa McAuliffe




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.