× 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.



How are you setting CLASSPATH when you run from RPG? I've not tried bundling everything in a single jar. I set all the jars as separate entries in the classpath.

-------- Original message --------
From: Sunil Patil <harshsng@xxxxxxxxx>
Date:02/10/2014 12:46 AM (GMT-06:00)
To: Java Programming on and around the IBM i <java400-l@xxxxxxxxxxxx>
Subject: Re: Extproc Java class call and Qsh call.....

In application the calls made using object methods [non static] which
returns the java string, main() is used only used for the debug. purpose.

All the necessary classes and reference jar files are wrapped into single
jar file. When I call the application using QSH or RUNJVA or EXTPROC it's
works fine but using QSH and RUNJVA I am not able to capture the response
string returned by java method into RPGLE variable. Using EXTPROC I am able
to capture the response java string. But when I use EXTPROC the Audit logs
are not written and debug logs by System.out.print statement went to STDOUT
which also get cleared for every call.

Here I need the logs generated by application for internal audit purpose.


On Mon, Feb 10, 2014 at 1:18 AM, Dan Kimmel <dkimmel@xxxxxxxxxxxx> wrote:

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.


--
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 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.