|
I realize this topic has been beaten to pulp in the archives, but I am
unable to determine why my simple RPG program cannot find a Java class that
I have written. I followed the steps that Kevin Vandever mentions in his
Midrange articles.
I have built a Prototype and RPG program as follows:
D postXml PR EXTPROC(*JAVA:'PostOutBoundXml':
D 'postXml')
D newString PR O ExtProc(*JAVA:
D 'java.lang.String':
D *CONSTRUCTOR)
D Class(*JAVA:'java.lang.String')
D charParm 100A CONST VARYING
RPG Program:
H DftActGrp(*NO) ActGrp(*CALLER)
/Copy *LibL/QRpgLeSrc,XmlOutPR
D strObj S O Class(*JAVA:'java.lang.String')
C/FREE
strObj = newString('<TEST>');
postXml(strObj);
Eval *inLR = *on;
/END-FREE
When I call the Java postXml method, I get an exception
"java.lang.NoClassDefFoundError: PostOutBoundXml" when calling
method "postXml" with signature "()V" in class "PostOutBoundXml". I created
the PostOutBoundXml class in Eclipse, jar'd it up, and placed the jar on the
IFS. I set the CLASSPATH variable as *job. The PostOutBoundXml does have a
package. However, I am assuming the 400 will register it within the jar
file? I am testing simply by calling the RPG program from the command line.
Does anyone know what I could be doing wrong? Any help would be greatly
appreciated.
Thanks,
Chad Cornelius, IIS
(720) 921-7835
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.