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.

...

Place yourself in the bin/ folder under your project

...

:

Code Block
cd bin/

Package the compiled Java binaries into an .jar file:

Code Block
 jar* *{-}cvf batch.jar myBatchJobs/arc/-*\*
  • mv batch.jar ~/NetarchiveSuite/.- Move the packaged batch job to your NetarchiveSuite directory.
  • cd ~/NetarchiveSuite/ - Go to your NetarchiveSuite directory.
  • 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).

...