Two Laptop Bag
The moose likes JSF and the fly likes JSF calling native programs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF calling native programs" Watch "JSF calling native programs" New topic

JSF calling native programs

Ty Davis

Joined: Mar 01, 2013
Posts: 6

Im a novice JSF/Java programmer. Im currently developing on an (what was called an) AS/400.

Currently Im using java native methods to call RPGLE subprocedures and return data/results. Service Program = Java Class | subProcedure = Java method

Is there a way that I can ?override? the java class structure and call the RPGLE subprocedures directly without having to use the java native wrapper?

Ive been reading the JSF 2.0 Complete Reference and it appears that I could override the (I think it's called) ?processAction? method. Is that a direction I could take?

Thank You.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17410

Java is Write-Once/Run-Anywhere, so direct invocation of any OS-specific service or non-Java code isn't possible. If your iSeries system allows you to present these commands as web services or remote method calls, you might be able to get away with pure Java. Otherwise, your best bet is to just supply JNI glue API modules. Or, if possible run them as command-line processes, via the java Runtime exec functionality.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: JSF calling native programs
It's not a secret anymore!