|
bruce jin wrote:
> ...
> (3) Set CLASSPATH by using
> ==> ADDENVVAR ENVVAR(CLASSPATH) VALUE('/home')
>
> (4) Run MyClass by using
> ==> JAVA CLASS(MyClass)
> It worked! This showed that CLASSPATH was set correctly.
>
> (5) Run RPG program and I got this error:
>
> Java exception received when calling Java method (C G D F)
> Cause . . . . . : RPG procedure CALLJAVA3 in program PRODLIB/CALLJAVA3
> received Java exception "java.lang.NoClassDefFoundError: MyClass" when
> calling method "addStuff" with signature "(II)I" in class "MyClass".
>
> Help!
>
Did you call any Java methods from RPG (even unsuccessfully) before
setting your CLASSPATH envvar? Once the JVM is started in a job, the
classpath is set for that job. Try signing off and back on to get a
fresh JVM.
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.