Redirection with the > symbol is part of the shell, not part of java

Why not run it from QSH or QP2SHELL? then what you are doing will work.

On Fri, Jan 20, 2017 at 10:29 AM, Gordon Schneider <
schneiderg@xxxxxxxxxxxxxxxxx> wrote:

I have installed the tika java application from apache.org on our power
server running IBM I version 7.2 and on my PC running Windows 10. We get a
word document from one of our vendors. We need to extract the text from it
to process the document.


I have this working on my PC by using the following command:

C:\Users\gord\Downloads>java -jar tika-app-1.14.jar -t
"C:\Users\gord\Documents\Goralta Invoice.doc" > "C:\Users\gord\Documents\Goralta
Invoice.txt"


The next step was to get the same result on our Power Server. I ran the
following command first

JAVA CLASS('/java/Tika/tika-app-1.14.jar') PARM('-t' '/java/Tika/Goralta
Invoice.doc')

It displays the text it extracted on the screen. Great. So I know the java
program is working on our system. The last step is to get the results to be
ported to a file.


I have tried many different combinations but I cannot get it to work. Here
is an example of what I have tried and the error we are getting.

JAVA CLASS('/java/Tika/tika-app-1.14.jar') PARM('-t' '"/java/Tika/Goralta
Invoice.doc" > "/java/Tika/Goralta Invoice.txt"')

Exception in thread "main" java.net.MalformedURLException: no protocol:
"/java/Tika/Goralta Invoice.doc" > "/java/Tika/Goralta In
voice.txt"
at java.net.URL.<init>(URL.java:609)
at java.net.URL.<init>(URL.java:506)
at java.net.URL.<init>(URL.java:455)
at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:472)
at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:145)
Java program completed with exit code 1


I am not a Java programmer. We use Java tools that make things easier for
us as RPG programmers. Any help you can provide will be very much
appreciated.



Gordon Schneider
403-236-0601
Trans Am Piping Products Ltd.

--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing
list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2022 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.