| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE html |
| PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html> |
| <head> |
| <link rel="stylesheet" type="text/css" href="../../com.ibm.help.doc/swg_info_common.css" /> |
| <title>JAR file placement</title> |
| <script language="JavaScript"> |
| function popup_window( url, id, width, height ) |
| { |
| popup = window.open( url, id, 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=' + width + ',height=' + height + ',left=,top=' ); |
| popup.focus(); |
| } |
| </script><script language="JavaScript" src="help/liveHelp.js"></script></head> |
| <body id="cjarpl"><a name="cjarpl"><!-- --></a> |
| |
| <h1 class="topictitle1">JAR file placement</h1> |
| <div><p>If your JAR file is only used in a single Web application, always put the |
| |
| JAR file in the Web project's WebContent/WEB-INF/lib folder. The JAR files |
| |
| in this folder are automatically added to the Java build path, and will not require any |
| |
| further setup when moved to a different server. </p> |
| <p>If the JAR file is used by multiple modules within the same application, |
| |
| place the JAR file in the enterprise application, then use the Java JAR |
| |
| Dependencies feature to set up the manifest files and the Java build |
| |
| class paths. The Java JAR Dependencies Properties page of an EJB or |
| |
| Web project is used to identify which JARs in the enterprise application the |
| |
| EJB or Web project (respectively) uses. You can access the Java JAR |
| |
| Dependencies by selecting Properties from the pop-up menu of an EJB or Web |
| |
| project. </p> |
| <p>If the JAR file requires access to any J2EE or WebSphere<sup>®</sup> classes, |
| |
| or to any other JAR files that have been added to ws.ext.dirs, it must also |
| |
| be placed on the ws.ext.dirs property. The ws.ext.dirs property is used for |
| |
| all JAR files that require access to the J2EE JAR files or WebSphere's internal |
| |
| classes. If there are hard dependencies on the JAR file, you must update the Java build |
| |
| path of each project that uses the JAR file. Any changes you want to make |
| |
| to ws.ext.dirs can be made using the server editor. </p> |
| <p>It is not recommended to put the JAR file on the global class path. Using |
| |
| one of the global class paths makes your application vulnerable to changes |
| |
| made to the classes on which you depend. If you have added the JAR file to |
| |
| the global class path or ws.ext.dirs properties you will have to publish the |
| |
| JAR file separately from your application, then you will have to set up the |
| |
| server class path again if you move to a different server.</p> |
| </div> |
| <div><p><b class="relconceptshd">Related concepts</b><br /> |
| <a href="../../com.ibm.etools.j2eeapp.doc/topics/cjjardep.html">JAR Dependency Editor</a><br /> |
| </p> |
| </div><p> |
| (C) Copyright IBM Corporation 2000, 2005. All Rights Reserved. |
| </p> |
| </body> |
| </html> |