Generally, don't use main for your calls with EXTPROC. main() is a static procedure with special formation that expects to receive it's parameters as constants (final) passed from the shell. Most of the time you want to use an object method in EXTPROC. Using QSH to start the JVM from your RPG using QCMDEXC is not a bad way to get it set up the way you want it. You might even set up a singleton object with the main method which you would then access within the call to your EXTPROC using a static method that returns the object instance as the first parameter passed in EXTPROC.

----- Original Message ----- From: "Sunil Patil" <harshsng@xxxxxxxxx>
To: "Java Programming on and around the IBM i" <JAVA400-L@xxxxxxxxxxxx>
Sent: Sunday, February 09, 2014 8:05 AM
Subject: Extproc Java class call and Qsh call.....


Hi,

I written one java application and wrapped it into single executable jar
file. Which send and receive web-service and request and response written
into log's files. I need to call these application through RPGLE where I
want to capture web response in RPGLE variable and display on AS400 display
file.

When I used STRQSH and call this web service the application it execute
properly and create Log folder [First time] and request and response
written into log files.

But When I call the main class using EXTPROC the application run
successfully and return the response to RPGLE variable but the logs goes
to STDOUT file. and file logger [LOG4J.jar Which is reference in single app
jar] is not working and the log files are not updating.

Also I have another problem with STDOUT is getting refresh whenever the
application is call. can I append the STDOUT and STDERR files so I can use
these for Auditing purpose.

I got some suggestion to use OVRPRTF command with OVRPRTF FILE(STDOUT)
TOFILE(QSYSPRT) HOLD(*YES)

Please advice on above problems...

--
Regards,
Sunil Patil.
--
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 ...

Follow-Ups:
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.