Det Biovidenskabelige Fakultet - Københavns Universitetwww.life.ku.dkFaculty of Life Sciences

Software

[Home][Software]

 

Sample scripts

Why create a script?

If you want to extend the amount of memory used for execution of the MLHMP software, if you want to install a non-native plug-in (your own or one downloaed separately), or if you for any reason wish to run MLHMP under non-standard conditions, the solution is to create a script launching Java and MLHMP.

 

Examples

Under Microsoft Windows, a script is just a text file with the extension ".bat" indicating that the file is executable.

In the following examples, it is assumed that the name of the script file is "mlhmp.bat". It is assumed that the MLHMP2.0.jar file has been saved in the directory "C:\Markov". Otherwise the scripts must be modified accordingly.

The class containing the main method is dk.ku.life.iph.mlhmp.Mlhmp

 

Extending memory

If you wish to run a large model, it may be necessary to allocate more memory than is allocated automatically. The content of the "mlhmp.bat" file could for instance look like this:

@echo off
cd \Markov
java -cp .;MLHMP2.0.jar;Limid.jar -Xmx1000M dk.ku.life.iph.mlhmp.Mlhmp

In the example, memory is extended to 1000 MB (the -Xmx option), and the class path (the -cp option) is specified to be the current directory and the MLHMP2.0.jar file.

 

Extending the class path for a plug-in

Suppose that you have downloaded the GrassLand plug-in and wish to install it. It comes together with some other plug-ins in the plugins2.0.jar file. You then need to include the plugins2.0.jar file in the class path. The content of the "mlhmp.bat" file could for instance look like this if the plugins2.0.jar file has been saved in the same directory as mlhmp.jar:

@echo off
cd \Markov
java -cp .;MLHMP2.0.jar;Limid.jar;plugins2.0.jar; -Xmx1000M dk.ku.life.iph.mlhmp.Mlhmp

The plug-in can then be installed as described in the manual.