Versions Compared

Key

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

...

Before reading these instructions, you will want to read Installing HPS Java, which explains how to build or get an HPS Java distribution jar file.

Distribution

...

Jars

The distribution jar file contains all of the project's dependencies in a distribution that can be run standalone using the java command.  The distribution will have "-bin" in the name.

This The jar file should will be found in your copy of HPS Java once after you have built it locally using Maventhe project locally.  You can use a simple ls command to check that it was built correctly.

Code Block
languagebash
cd hps-java; ls distributionls distribution/target/hps-distribution-[VERSION]-bin.jar

...

*-bin.jar

Any references to hps-distribution-bin.jar in command line syntax used on this page should actually be within these instructions should be replaced by the complete path to the HPS Java the distribution jar which was built.

Running the Jar File

The distribution jar can be run in two basic ways.  You can run a   You may run the default main method using the -jar switch, or you can use the -cp to supply a list of jars in the classpath and activate any  switch can be used along with the path to a class's main method.

Running the

...

Job Manager

Using the -jar switch from the command line will run the main from the class JobManager, which is specified inside a special manifest file in the distribution jar (in case you were wondering how that works) JobManager which processes LCIO files using a steering file configuration.

Code Block
languagebash
java -jar ./distribution/target/hps-distribution-bin.jar [args]

Without any arguments, it will print the command line options and then exit.

The default main method can be used when you are processing LCIO files using XML steering configurations.

Running a

...

Specific Class's Main Method

You can also run the main method from any class in the jar, for example:

...