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



Dieter,

It will be on IBM i.  It's a Java program and I need to call an IBM i API.  I was thinking along the lines of JNI, I have done some of that in Windows.  I just needed an example to understand a little more about the needed references and libraries (if any).  I could do it in ROG is I had to but the Java program was pretty complete...just needed that IBM i API call to finish it.  I really don't want to rewrite the thing so I can use RPG to make the API call into a system API.

I'll keep poking around.  I know I could go the JT400 route but even those API's are wrappers around JNI calls to system services (I think).  I saw some code that was using sockets to communicate but I think they were DB routines.

Still looking

Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
Twitter - Sys_i_Geek IBM_i_Geek

On 2/23/2020 1:18 AM, D*B wrote:
<Pete>
Can't seem to find an example of this that doesn't involve using the jt400 toolkit or PCML.  I also thought *I* had written one of these at one time but can't seem to dig it up.  The goal is to make a call to a system API in Java. Similar, I guess, to the Java API's that wrap system API's found in JT400 (which must exist but I haven't found a good example there either)


Anyone got something simple?
</Pete>

Hi Pete,

what problem do you wan't to solve? If your java code should run on local AS/400, JNI would be possible. If your java code is coming from another box, you would have to adress some listener. Anyway you would have to do some conversions from java data types to binary data formats, understood by as400 native code.
Some time ago, I was working in a project to develop an as400 plugin for a java based  monitoring software. The alternatives for me were: installing toolbox locally or installing some java code on the server. I decided to go the first alternative.
My recommendations from this:
- stay away from PCML and recordFormat ...
- start with wrappers for the toolbox conversions (using the toolbox classes you could put in every garbage and it will crash trying converting back)
- encapsulate all toolbox stuff in classes of your own to avoid to spread it around
examples for dataQ APIs could be found my open source AppServer4RPG/ArdGate.
For some API examples drop me a private mail.

Dieter

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