Hi Jack,
David's answer is close but I wouldn't expect it to work as is. The
reason is that "ExtractText" and "cons.pdf" are separate arguments or
parameters. IOW, using your doc example:
usage: java -jar pdfbox-app-x.y.z.jar ExtractText [OPTIONS] <PDF file> [Text
file]
everything after the jar are arguments, including the ExtractText "command".
So, for JAVA/RUNJVA use PARM( 'ExtractText' 'cons.pdf' ), add any other
arguments as necessary.
If you run the jar as executable, your classpath should just need to be
"/JavaPDF". If you run the class as in the example, your classpath should
be "/JavaPDF/pdfbox-1.6.0.jar". The reason is that an executable jar has
its entry point (class to load) defined in the manifest.
HTH,
Joe Sam
Joe Sam Shirah - www.conceptgo.com (904) 302-6870
conceptGO - Consulting/Development/Outsourcing
Java Filter Forum: www.ibm.com/developerworks/java/
Just the JDBC FAQs: www.jguru.com/faq/JDBC
Going International? www.jguru.com/faq/I18N
Que Java400? www.jguru.com/faq/Java400
-----Original Message-----
From: David Gibbs
Sent: Tuesday, March 06, 2012 9:51 AM
To: Java Programming on and around the IBM i
Subject: Re: Question about running a Java Class
On 3/5/2012 7:10 PM, Jack Tucky wrote:
I was able to get the extract to work on my PC using this command.
Can anyone help me "convert" the syntax to Iseries?
Try this:
qsh cmd('java -cp pdfbox-app-1.6.0.jar org.apache.pdfbox.PDFBox
ExtractTextcons.pdf')
or this:
JAVA CLASS('org.apache.pdfbox.PDFBox') PARM('ExtractTextcons.pdf')
CLASSPATH('pdfbox-app-1.6.0.jar')
david
As an Amazon Associate we earn from qualifying purchases.