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



Your classpath is probably correct. Just make sure the *public authorities for 
the components of the classpath, and the jar files have RX=execute privilidge. 
You can check authorities with 'wrklnk' menu options and change them from there.
RPG to Java interface, (in fact whole IFS objects as far as I understood) does 
not honour "run as owner" concept, so you need to ensure that everybody has 
relevant authorities.
If this ends up to be the problem, other solution is to switch the user ID to a 
superman user ID before calling any java method, then switch back after it's 
done.
Hope it helps.


-----Original Message-----
From: pekrzyz@xxxxxxxxxxxxxxx [mailto:pekrzyz@xxxxxxxxxxxxxxx]
Sent: Thursday, September 04, 2003 12:22 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: ClassPath Woes - What the Heck is happening.


Hi:

I am having problems running a RPGILE program which calls my Java program. 
It runs perfectly when the Java program resides in my personal IFS folder, 
but bombs when moved to any other folder.

I have set-up an personal IFS folder '/home/pkrzyz' (my login id) and in 
this folder I have my Java Class file and related jar files.

I have set the CLASSPATH environment variable to read: 
' 
:/home/PKRZYZ/OraCon.class:/QIBM/Proddata/Java400/oracle/classes12.zip:/home/PKRZYZ/jt400.jar'

Everything is fine and runs properly until I put it into production.

When I moved the Java program to the production folder  '/home/ABAIDS' and 
changed the ClassPath variable to point to this folder, my RPG Program 
bombed because it could not find the OraCon initialization method.  I 
tried to recompile the Java program in the production folder but this 
didn't help.

I tried setting the CLASSPATH option within CRTJVAPGM to '*envvar' 
(defaults to *none) but this did not help.

Another user wanting to use the Java program tried to run it from my 
personal home directory.  The person had properly set-up the classpath 
variable.  This did not work even after I gave that user full rights to my 
personal folder.

That user was only able to successfully run the RPG program, once we 
created a  personal directory for that user under '/home'  and using their 
loginid as the folder name. We then copied the Java programs to their 
newly created folder and changed the environment variable to point to 
their personal folder under home.

The problem with this solution is that if I make changes to the Java 
program, I have to copy it to everyone's personal folder (not the 
solution). 

What is going on here with the classpath.  It seems to be ignored if it is 
not set to your personal (loginid) folder.
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.