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


  • Subject: Re: How to set up Library list for servlet on AS400?
  • From: "Bruce Jin" <brucej@xxxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 13 Mar 2001 11:26:17 -0600

Hi Jim.

Thanks for the response!
I can now call JNI to RPG in Qshell or RUNJVA using java.library.path
property.

I found it is interesting that I can also add MYLIB to my library list
before using RUNJVA or going to Qshell so that I don’t have to use
java.library.path property.

Now my question is: I use JNI to call RPG in servlets which are invoked by
WebSphere. How do I add MYLIB to the “library path” of the servlets or
WebSphere?

(BTW, it appears that JNI call is a lot faster than Toolbox program call in
Qshell or RUNJVA)

TIA
Bruce


-----Original Message-----
From: Jim Mason <JEMason@compuserve.com>
To: INTERNET:JAVA400-L@midrange.com <JAVA400-L@midrange.com>
Date: Tuesday, March 13, 2001 10:53 AM
Subject: How to set up Library list for servlet on AS400?



Hi Bruce.

For JNI, a good way to specify the library list for an RPG program is:

supply the list in the java.library.path property.
You can modify the java.library.path property in QShell and from the AS/400
command line.

From the Qshell command prompt, type in:
java -Deja.library.path=/QSYS.LIB/MYLIB.LIB -Djava.version=1.2 myclass

Or, from the AS/400 command line, type in:
JAVA PROP((java.library.path ’/QSYS.LIB/MYLIB.LIB’) (java.version ’1.2’))
myclass

Where /QSYS.LIB/MYLIB.LIB is the library that you wish to load using the
’System.loadLibrary()’ call,
and myclass is the name of your Java application.

see the AS/400 Java manual:
AS/400 Developer Kit for Java for more on JNI...

Other options than JNI to call RPG programs from Java include:
1  JDBC stored procedures
2  Java toolkit program call class
3  Runtime.exec()

JNI is very good if you need to call specific procedures in an ILE service
program.  If you write RPG ILE service programs, you can call specific
procedures nicely.  Any of the other methods are easier to do than JNI BUT
only can call a program ( not a specific procedure ) passing parms and
receiving updated parms back.

JDBC stored procedures are excellent IF your RPG program should do some
complex processing and return a simple result set of rows for a client Java
application to process....

Hope this helps...

Jim Mason


Message text written by INTERNET:JAVA400-L@midrange.com
>
I am trying to use JNI to call RPG programs in servlet. I put the RPG
service program in library MYLIB. How do I include MYLIB in the “library
path” of the servlet so that servlets can find the service program?

TIA.

Bruce
<

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net
+---

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.