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





Joe:

I am very careful about putting things in the ext library. It is
equivalent to putting programs and commands in QUSRSYS. The jars are
available whether you mean for them to be or not. Guess that can be a
good or bad thing.

I would only put a jar in the extension library if it was something I
used frequently and did not change (much). For example apache log4j.

Generally I start RUNJVA from a CL and building the classpath in a CL
variable and then using that to ADD or CHG the environment variable
CLASSPATH.

For example:

DCL &CLASSPATH *CHAR 1024

CHGVAR &CLASSPATH ('/java/sysmon:/java/log4j-1.2.14.jar')
CHGVAR &CLASSPATH (&CLASSPATH *TCAT ':/java/sysmon/jt400Native.jar')
CHGVAR &CLASSPATH (&CLASSPATH *TCAT ':/java/sysmon/sqljdbc.jar')

One jar file per line -- I find that easier to keep track of.

I suppose the jar files could be put into a AS400 file and use RCVF to
read the file and build the classpath CL variable.

Regards
Bill Blalock

-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Joe Sam Shirah
Sent: Monday, April 20, 2009 11:57 AM
To: Java Programming on and around the iSeries / AS400
Subject: Re: Classpath Setting Using only Folders


Hi Scott,

One possibility is the Extension Mechanism Architecture using the
java.ext.dirs system property. If you do that, you should include the
standard extension directory as well. See:

http://java.sun.com/j2se/1.4.2/docs/guide/extensions/spec.html#installed


Joe Sam

Joe Sam Shirah - http://www.conceptgo.com
conceptGO - Consulting/Development/Outsourcing
Java Filter Forum: http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International? http://www.jguru.com/faq/I18N
Que Java400? http://www.jguru.com/faq/Java400

----- Original Message -----
From: "Scott Johnson" <sjohnson@xxxxxxxxxxxxxxx>
To: <JAVA400-L@xxxxxxxxxxxx>
Sent: Monday, April 20, 2009 10:30 AM
Subject: Classpath Setting Using only Folders


Is it possible to specify the directory path to a folder containing
multiple jar files and not have to specify the jar files directly?
This
is
for calling Java stuff from within RPG on an i5 running jvm 1.5.

I have tried searching for good examples, but they all show specifying
the
jar directly in the ClassPath. I have tested different scenarios and
none
seem to work. The java guy here says that in the windows realm they do
something like: "C:\jardir\*;E:\morejars\*". Using '*' does not work
on
i5.

When dealing with something like JasperReports, specifying all the
jars it
uses gets out of hand. I would rather just specify the folder
containing
the jars.

Examples I have tried:
/QIBM/UserData/Java400/ext/JasperReports
/QIBM/UserData/Java400/ext/JasperReports/
/QIBM/UserData/Java400/ext/JasperReports/*


Thanks,
Scott J




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.