ADC Home > Reference Library > Technical Q&As > Legacy Documents > Java >

Legacy Documentclose button

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:

Determining MRJ's Version


Q: How can I tell what version of MRJ I am currently using?

A: There are a couple ways to determine what version of MRJ is active. At run time you can look for the mrj.version property as shown below. If the property is not found, the System will return null, which is why we test for this case in the code:

String version = System.getProperty("mrj.version");
if (version == null)
    System.out.println("Not running with MRJ");
else
    System.out.println("mrj.version: " + version);

Unfortunately, versions of MRJ prior to 2.2 EA2 have a security manager which does not allow un-trusted Applets to access this property, meaning there is no guaranteed runtime version checking available for Applets running under older versions of MRJ.

Alternatively, you can use the Get Info command in the Finder to look at the version information of the MRJLib file. The MRJLib file is located in the "MRJ Libraries" folder inside the "Extensions" folder of your active System Folder.

Keep in mind, however, that MRJ gets loaded using the normal Shared Library loading methods. This means that if there is a copy of MRJ in the same folder as the application using it, the application will find and use the MRJ in its folder rather than the one in the System Folder. Using the mrj.version property is a foolproof method to determine which version is currently running.

[Sep 27 1999]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.