You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Contents

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:

sbt stage

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

In Cygwin:

To execute daffodil:

$ ./daffodil-core/target/start <options>

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

$ ./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:

$ ./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:

$ sbt stage

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

$ ./daffodil-core/target/start <options>

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

$ ./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:

$ ./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

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

Click the button circled in red below:

You should now see the following window:

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:

Now select the "Arguments" tab.

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:

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

VM arguments:

-Xms512M -Xmx1512M -XX:+HeapDumpOnOutOfMemoryError

When complete your dialog should resemble the following:

Click Apply.

Click Run.

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

 

 

 

 

  • No labels