Re: Call system API from Java

"D*B" <[email protected]>
Newsgroups gmane.comp.lang.as400.java
Message-ID <7E2388E626C446719E246C7D98E902BE@Lisp>
<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 

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

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.