×
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.
Hi Tim,
First of all, you don't want /QIBM/UserData/Java400/ext in your
CLASSPATH. That directory is for "java extensions" that are always
loaded in all Java invocations. So stuff there is ALWAYS loaded, no
matter what the application is, and is completely separate from the
classpath.
The reason you don't want to use that directory for everything, even
though it seems simple, is it can cause version conflicts. Your whole
system uses /QIBM/USerData/JAva400/ext, so if one piece of software
needs one version of something, and another piece needs another version
of something, you'd be in trouble if it's in "ext". Not to mention that
loading unnecessary code with every Java program is inefficient.
As for the CLASSPATH itself -- remember it's a list of places to look
for Java classes. Just as a library list is a list of places to look
for programs (et al). Each thing in the classpath is a "container"
(much like a library is a container for programs).
a JAR file is a ZIP file containing many Java "CLASS" objects. So it is
a container -- just like a library would be.
You can also put CLASS files directly in an IFS directory and reference it.
But you can't just reference a directory that contains JAR files.. you
have to list the files themselves, because JARs are containers. They're
not the CLASS files themselves.
-SK
On 2/6/2013 11:36 AM, tim.dclinc@xxxxxxxxx wrote:
im using Scott's POI to write excel documents. I placed the jar files in
the ifs "java" folder. I modified the classpath as follows:
/QIBM/UserData/Java400/ext/:/java/poi3.1/
when i try executing my code, i get a class not found error. I modified
the classpath as follows again:
/QIBM/UserData/Java400/ext/:/java/poi3.1/poi3.1.jar
and now it works.
Im not sure why i have to specify the jar file in the classpath. Why
doesnt it work just specifying the folder the jars are contained in.
As an Amazon Associate we earn from qualifying purchases.