View comments | RSS feed
Take a survey

Component XML Reference > Component XML Elements > Component element > class-path

class-path
Specifies JAR files that are required by the component. This element consists of a space-delimited list of JAR files, the content of which must be available for access by the classes in the component. This element is optional. If not present, then all JAR files are expected to be at the root of the component JAR file.
<class-path>
	"xs:string"
</class-path>
Located in the component element.
Example
<class-path>activation.jar mailapi.jar</class-path>

Comments


jason.chen.nj said on Feb 21, 2008 at 2:52 PM :
Can the classpath refers to the thirdparty folder's jars? What should be the best way to share the components among components? If the components are loading their own version of third party jars, is it going to break the container's classpath or it may break the other component's classpath. How can this be managed?
smacdonald2008 said on Mar 4, 2008 at 7:16 AM :
One way this can be managed is by importing the 3rd party jar into the component JAR and specifying the 3rd party JAR name in the class-path element.

For more info, see:

http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/componentCreating.158.1.html


See how the JavaMail API JAR files were handled.

Thanks for your comment.
No screen name said on Jul 16, 2008 at 11:48 PM :
How about properties files. Do we need to specify them in the classpath?

Also I have came to a situation where my property file is on the root of the jar and following code to read this file is working:

this.getClass().getClassLoader().getResourceAsStream(PROPERTIES_FILE);

While following one is not working:

Thread.currentThread().getContextClassLoader().getResourceAsStream(PROPERTIES_FILE);

I would be very thankful if you answer this as I am using lots of third party APIs and they are making use of second approach.

Regards
Imam Raza

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/componentXMLREF.152.8.html