This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF calling native programs" Watch "JSF calling native programs" New topic
Author

JSF calling native programs

Ty Davis
Greenhorn

Joined: Mar 01, 2013
Posts: 6
Hello,

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: 16019
    
  20

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
Consider Paul's rocket mass heater.
 
subject: JSF calling native programs