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



Having problems with defining my Class-Path in a jar.  I can get the jar to run 
if there is only one entry but not for
more entries.  

The jar contines a collection of classes that uses other, external classes to 
work (for example, one of the external
classes is a wrapper class for JDBC connectivity).  It will find the external 
classes if I put them in the jar and will
find it if I specify the classpath on the java command line (without using 
-jar, of course).  However, when I code the
Class-Path entry in the manifest.mf file, it doesn't find the external class.  

confused?  me too... here are some examples (The names have been changed to 
protect the innocent):

// Jar contains all classes, including external wrapper class (this works):
Manifest-Version: 1.0
Main-Class: com.test.OEMDB01
Class-Path: /XYZZY/lib/jt400.jar

// Jar does not contain wrapper class, instead uses a Class-Path to find it
// (this doesn't work):
Manifest-Version: 1.0
Main-Class: com.test.OEMDB01
Class-Path: /XYZZY/lib/jt400.jar /XYZZY/prod/classes

I can use JAVA to run the class if I specify the classpath of the warrper class 
(not using the jar, just plain old
.CLASS files): 
-cp .:/XYZZY/lib/jt400.jar:/XYZZY/prod/classes

This is my first foray into "runnable jars" and would like to use them.  Prior, 
we have kept the directory structure (on
the IFS) and and run the classes from within the directories.

Can anyone help? 

dan

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.