Skip to Main Content U.S. Department of Energy

Running MIF as a Server

The directory MIF_HOME/bin contains OS-specific scripts for launching MIF from the command line. These scripts reference the MIF classpath and have a place for you to add classpath entries specific to your application.

  • NOTE: If you want to create your own launcher script, please note that MIF's classpath is stored in mif-installer-VERS.jar/META-INF. Therefore, specifying this jar in your classpath includes all MIF dependency jars from MIF_HOME/jars


In bin/run-mif.bat, edit the variable app_classpath to include the classpath for your application code. Then, run your application with the command:

> bin/run-mif.bat -c

Linux / MacOSX

Before you start: In bin/, edit the variable $APP_CLASPATH to include the classpath for your application code.

There are two ways to run MIF in Linux/Mac OSX - in the foreground and in the background.

Running MIF in the foreground means logging output goes to your current console and MIF is stopped with ctrl+c. An example of a command to run MIF in the foreground would be:

# bin / -c gov.pnnl.mif.samples.hello.stdio.HelloStdioDriver

This command allows us to run the HelloStdioDriver (Hello World) in the foreground and log the activity of the program.

Running Mif in the background means that the program runs as a service and logging goes into a log file in log/. The above example would be as follows:

# bin / -c gov.pnnl.mif.samples.hello.stdio.HelloStdioDriver

Please note that arguments inputted into the console will be passed to the class through the Java class RunMif. Also note that to successfully run a program, it must have a main method that creates and configures a MIF pipeline as in HelloStdioDriver (Please review the Hello World example if you are unsure which programs create and configure MIF pipelines.

mif_server_instructions.txt · Last modified: 2010/05/19 13:32 by adamw