× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




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.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.