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



Robert Upshall wrote:
>
> I have an API that I want to use in a RPG program.  The API(jar) is
> dependant on 3 other jar files.  I have written ILE prototypes over the main
> class I want to use.  I can create the instance of the class, run some
> methods of the class, but 1 method that relies on other jars fails with a
> class not found exception.  I have all 4 jars added to the same classpath
> but for some reason it tells me class not found on one of the dependant
> classes.
>
> I also created a Java program that does the same thing as the rpg pgm and
> placed it on the IFS, under qsh I can compile and run the method fine.  I
> use the same user for qsh/java as I did for the rpg, the classpath is the
> same for both yet the rpg tells me class not found.
>
> I noticed that the first time I ran my rpg it linked the jar files to
> something, initially I was using an older version of the jar file that
> didn't need the other 3 jars.  Is it possible that the old jar is still
> linked to something?  If so how can I "unlink" it.
>

Robert, I assume you've signed off and back on.  Once the JVM is
started, the classpath can't be changed, and you can't end the JVM and
restart it in the same job (at least
not reliably).

Did you specify the classes exactly the same in your RPG as you did in
your import statements in Java, with the package info (*JAVA :
'mypackage.mysubpackage.myclass')?

That's all I can think of that could be causing your problem.

When RPG starts the JVM, it just uses the CLASSPATH environment variable
when it sets up the parameters for the call to the JNI Invocation API.
I don't really know how this is actually used by JNI.

Barbara




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.