Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contents

Table of Contents
excludeContents

Run Daffodil from the Command Line/Terminal

Windows

Install and Configure Cygwin to Run Daffodil

In the Windows Command Line (cmd.exe), CD to the root of your local DFDL repository.  Default is likely "C:\Users\UserName\git\dfdl".

The command line of Daffodil is invoked through an auto-generated bash script. To generate the script type the following command:

Code Block
sbt stage

The script is created in daffodil-core/target/start

In Cygwin:

To execute daffodil:

Code Block
languagebash
$ ./daffodil-core/target/start <options>

To determine the usage, execute the script with the --help option

Code Block
languagebash
$ ./daffodil-core/target/start --help

The result of the above command should display several help options for the daffodil program.  If it doesn't, please make sure that you've followed all of the previous steps.

From Cygwin, try this:

Code Block
languagebash
$ ./daffodil-core/target/start parse -s daffodil-core/src/test/resources/test-suite/tresys-contributed/AB.dfdl.xsd daffodil-core/src/test/resources/test-suite/tresys-contributed/AB006.in

If the above executes and prints out an infoset as a result, you've set up everything correctly and you're ready to start using Daffodil!

Linux

The command line of Daffodil is invoked through an autogenerated bash script.

Open a Terminal and cd to the root of your local DFDL repository. Likely "/home/username/git/dfdl".

To generate the script run:

Code Block
languagebash
$ sbt stage

The script is created in daffodil-core/target/start, to execute daffodil:

Code Block
languagebash
$ ./daffodil-core/target/start <options>

To determine the usage, execute the script with the --help option

Code Block
languagebash
$ ./daffodil-core/target/start --help

The above should printout information regarding the various options you can run Daffodil with.  If it doesn't, please make sure that you've followed all of the steps.

Try this:

Code Block
languagebash
$ ./daffodil-core/target/start parse -s daffodil-core/src/test/resources/test-suite/tresys-contributed/AB.dfdl.xsd daffodil-core/src/test/resources/test-suite/tresys-contributed/AB006.in

If the above executes and prints out an infoset as a result, you've set up everything correctly and you're ready to start using Daffodil!

Run Daffodil from Eclipse

Open Eclipse.

Make sure that you are in the Scala Perspective.

Select the project "daffodil-core"

From the top menu click Run -> Run Configurations

Image Removed

The Run Configurations dialog will appear.  Select "Scala Application" from the left menu.

Image Removed

Click the button circled in red below:

Image Removed

You should now see the following window:

Image Removed

For Name: Replace "New_configuration" with "Daffodil Main".

In the field beneath "Main class" enter "edu.illinois.ncsa.daffodil.Main"

The dialog should look like the following:

Image Removed

Now select the "Arguments" tab.

Image Removed

This is where you can pass in the various options that Daffodil recognizes as well as any JVM arguments you may need.

We're going to start wilth the following settings:

Program arguments:

Code Block
parse -s src/test/resources/test-suite/tresys-contributed/AB.dfdl.xsd  src/test/resources/test-suite/tresys-contributed/AB006.in

VM arguments:

Code Block
-Xms512M -Xmx1512M -XX:+HeapDumpOnOutOfMemoryError

When complete your dialog should resemble the following:

Image Removed

Click Apply.

Click Run.

After some period of time you'll see the following output:

Image Removed

 

 

 

 Page content removed(obsolete). See https://cwiki.apache.org/confluence/display/DAFFODIL/For+Contributors