|
Hi Patrick, What you are trying to do isn't possible, by definition. The Java Native Interface allows Java programs to talk to applications *native to that platform* The mechanism is shared libraries. On Windows, that means a DLL. The Java runtime is not going to look to another machine to load a native shared library. JNI, by definition, is not portable. If the JNI portion were in standard C, you could recompile and use it on another platform, but not in its native state. That's the downside of using JNI. To talk to objects/programs on another machine, RMI, servers/sockets or other distributed programming operations are needed ( including the methods previously mentioned. ) Joe Sam Joe Sam Shirah conceptGo - Consulting/Development/Outsourcing Java Filter Forum at: http://www.ibm.com/developerworks/java/ Just the JDBC FAQs: http://www.jguru.com/faq/JDBC Going International? http://www.jguru.com/faq/I18N Qué Java400? http://www.jguru.com/faq/Java400 ----- Original Message ----- From: "Patrick Goovaerts" <pgoovaerts@pandora.be> To: <java400-l@midrange.com> Sent: Thursday, December 05, 2002 12:33 PM Subject: RE: java to rpg problem > We now how to use the 'distributed program call', that's not the > problem. We can call rpg-programs and recieve data from it without any > problem but that's not exactly what we want. > > What we are trying to use RPG-modules (or subroutines in it) as if it > were java-methods... > > When we put the java program on the iSeries, the > "System.loadLibrary("PROGRAMNAME");" statement is executed. Of course > this isn't of much help because we want to run it from PC's (with > GUI-interface). > > Again, it seems to me that the linking of the object "programname" isn't > found because, on the PC, java looks for a local "programname.dll" file > while it should be looking for the object on the iSeries. We tried > other directives like "//sysname/library/programname" or > "//sysname/library.programname",etc... to force looking on the iSeries > but it doesn't help. > > > > Patrick Goovaerts > pgoovaerts@pandora.be > TEL: 0032-3-6472715 > GSM:0498610325 > > > > -----Oorspronkelijk bericht----- > Van: java400-l-admin@midrange.com [mailto:java400-l-admin@midrange.com] > Namens Joe Pluta > Verzonden: donderdag 5 december 2002 17:26 > Aan: java400-l@midrange.com > Onderwerp: RE: java to rpg problem > > > > From: P.Goovaerts@Clipper.Be > > > > Anyone using java to rpg-modules connections on iSeries??? We have > > written an object-oriented RPG program following MVC pattern. The RPG > > > program runs fine and now we have written a java program which uses > > the RPG modules but displays result in a GUI. > > I call programs using IBM's Java Toolbox (JTOpen) and the ProgramCall > class. This allows Java programs on one machine to call RPG programs > running on a different box. Is this what you're looking for? > > Other options include direct JNI calls and stored procedures. > > Joe > > _______________________________________________ > This is the Java Programming on and around the iSeries / AS400 > (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l > or email: JAVA400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/java400-l. > > > _______________________________________________ > This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list > To post a message email: JAVA400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l > or email: JAVA400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/java400-l. >
As an Amazon Associate we earn from qualifying purchases.
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.