|
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] Patrick, See the previous answer by Joe Sam Shirah. That method tries to load a "shared object" native to that platform. When the JVM is running on Windows, as with WDSC, it will attempt to load a DLL. On the iSeries it would attempt to load a *PGM or *SRVPGM. However, even then the program would have to be written to the JNI standard, which means C. You could write JNI "wrappers" in C that in turn call your RPG. But you could not test or run that code on any platform but the iSeries. If you already know how to use the ProgramCall class, why not just use it? You can hide the usage of that class in another class that hides the complexity. For example, we will write classes like Order with method likes calculateSalesTax. That method will do a ProgramCall to an RPG program, but that fact is invisible to a user of our Order object. Mark "Patrick Goovaerts" <pgoovaerts@pandora.be> Sent by: java400-l-admin@midrange.com 12/05/2002 01:13 PM Please respond to java400-l To: <java400-l@midrange.com> cc: Subject: RE: java to rpg problem Mark, >> You have to export the procedures and bundle them in a *SRVPGM. In other words, they have to be bundled in such a way that a CL program >> could use them via CALLPRC or another RPG program could use them via CALLB or CALLP. This part is ok. >> Once you have done that, you can then call them via the "distributed program call" method you refer to (PCML and the Toolbox). If you >> are running the Java code on the iSeries, just put the Toolbox Native Optimizations in the CLASSPATH and the call will run in the same >> job as the Java code and not require you to supply a user name and password on the AS400 connection class. As stated before, loading the class on iSeries doesn't produce an error but when running inside WDSc (WebSphere Development Studio for iSeries v4.03), the error is generated although it doesn't show any errors in java/web perspectives which means that compiling is ok. This is the code which fails: Static { "System.loadLibrary("PROGRAMNAME"); } This is the error displayed on console-panel inside WDSc: java.lang.UnsatisfiedLinkError: no PROGRAMNAME (PROGRAMNAME.dll) in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1380) at java.lang.Runtime.loadLibrary0(Runtime.java:766) at java.lang.System.loadLibrary(System.java:849) at Agents.AgentsController.<clinit>(AgentsController.java:35) Exception in thread "main" Patrick Goovaerts pgoovaerts@pandora.be TEL: 0032-3-6472715 GSM:0498610325 _______________________________________________ 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.