Configuring How to configure mxj

The java/max.java.config.txt file enables customization of the mxj system with respect to classpath and virtual machine options. Examples for using the file are contained within the file itself in comments beginning and terminating with semicolons. Copy a line, remove the semicolons and edit the text to suit your configuration. All the paths in max.java.config.txt should be specified as max style paths. So whether using Mac or Windows the directory format is:

volume:/path/to/dir

or

/path/to/dir

Classes loaded in the system classpath cannot be reloaded dynamically. For these classes the "_zap" message described on the Compiling page will have no effect. Classes in the dynamic classpath can be reloaded dynamically. If you're adding your own directory to the classpath it is probably best to add a dynamic entry as opposed to a system entry.

Here's a brief synopsis of the available options:

max.system.jar.dir [directory] - adds all JARs in the directory to the system classpath

max.dynamic.jar.dir [directory] - adds all JARs in the directory to the dynamic classpath

max.system.class.dir [directory] - adds the directory to the system classpath

max.dynamic.class.dir [directory] - adds the directory to the dynamic classpath

max.jvm.option [option] - set JVM options

max.classloader.fromdisk [val] - by default val is 0, which means that once a class has been loaded from the hard drive it will be cached in RAM. If val is 1 every new instance of a class loads the class file anew from the hard drive. Using 1 will make new object instantiations quick, but using 0 can be convenient when developing code for new mxj classes.