|
> I had an application that used a component dependent on a lot of open > source > JARS, and I didnt want to type them all in to the classpath one by one. > So I created custom classloader that I could point at a directory, and it > would add all the jars to the classpath. You can achieve the same results as that by using the Class-Path identifier in your JAR file's Manifest.mf file, for your application. It's values can be relative or absolute, for example; Manifest-Version: 1.0 Created-By: Ant version 1.5.1 compiled on October 2 2002 Built-Date: June 16, 2004 01:03 PM Build-Machine: unknown Build-Mode: Debug JAR JVM-Implementation-Version: 1.4.1_02-b06 JVM-Implementation-Vendor: Sun Microsystems Inc. Class-Path: xerces.jar castor.jar .\..\someother.jar The default classloader will try to load them from, and relative to, the location of your JAR file. You don't need to enter any class path entries on the command line. --phil
As an Amazon Associate we earn from qualifying purchases.
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.