This topic has come up many times on midrange - here and on the RPG400 list. There are many "solutions" so I suggest you check the archives and pick your favourite approach.

The basic reason this occurs is because the JVM grabs the environment variables when it starts - and since it can only be started _once_ per job, all required jars need to be available when it first starts. The "cure" of sign off and back on again works because the JVM will be restarted in the new job.

On 2014-02-07, at 1:32 PM, Sunil Patil <harshsng@xxxxxxxxx> wrote:


I am facing some issues when calling java class through RPGLE, Below is

I have two different Java applications.
When user log-in and call application-1 its run successfully. But in same
job if user call application-II gets java class not found error.
If user log out and log in again and call application-II it runs
successfully but now in this session if user calls application-1 I get same
error class not found for application-I

I created CL pgm where I am adding ENV variables e.g classpath with
*replace option.
In rpgle active group is *caller

Both applications are using separate property files

Please advice which env variable I need to change to solve this issue. or
what actions I need to take...

Sunil Patil.
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

Jon Paris

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2022 by 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.