blob: 8850a90a7647e2898b416a1fe329ef452385f551 [file] [log] [blame]
<?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>
<!-- /*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<title>JAR file placement</title>
</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>
</body>
</html>