× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks Barbara:
Signoff and signon again did the trick. I must have called Java from RPG before setting CLASSPATH in the same job.
It looks like JAVA command starts a different JVM than that used by RPG.
Thanks again.
Bruce



Barbara Morris wrote:

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 thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.