Versions Compared

Key

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

...

E.g. to run the batch job from the file myBatchJobs/arc/MyArcBatchJob.java, which inherits the ARCBatchJob class (dk/netarkivet/common/utils/arc/ARCBatchJob), do the following.

1. Place yourself in the bin/ folder under your project:

Code Block
cd bin/

2. Package the compiled Java binaries into an .jar file:

Code Block
 jar* *{-}cvf batch.jar myBatchJobs/arc/-*\*

...

 

3. Move the packaged batch job to your NetarchiveSuite directory.

...

Code Block
 mv batch.jar ~/NetarchiveSuite/

...

4. Run the following command to execute the batch job:

Code Block

   java -Ddk.netarkivet.settings.file=conf/settings_ArcRepositoryApplication.xml \
        -cp lib/dk.netarkivet.archive.jar:lib/dk.netarkivet.common.jar
        dk.netarkivet.archive.tools.RunBatch -Jbatch.jar -NmyBatchJobs.arc.MyArcBatchJob

The lib/dk.netarkivet.common.jar

...

library need to be included in the classpath since the batch job (

...

myBatchJobs/arc/MyArcBatchJob) inherits from a class within this library (dk/netarkivet/common/utils/arc/ARCBatchJob).

Security

If the security properties for the bitarchive (independent of this execution) are set as described in the Configuration Manual the batch program will not be allowed to:

...