2 JPF can also be used embedded, i.e. called from another Java application. A basic code sequence to start JPF looks like this:
5 import gov.nasa.jpf.JPF;
6 import gov.nasa.jpf.Config;
8 void runJPF (String[] args) {
10 MyListener listener = new MyListener(..);
12 // [optionally] if you pass through command line args,
13 // 'null' any consumed args not to be JPF-processed
14 listener.filterArgs( args);
17 Config config = JPF.createConfig( args);
18 // set special config key/value pairs here..
20 JPF jpf = new JPF( config);
21 jpf.addListener( listener);
27 Of course, you can also call `gov.nasa.jpf.JPF.main(args)` from within your application, if you don't need to control JPF's configuration or process it's output.