jlaskowski 2005/02/24 08:44:53
Modified: modules/core/src/java/org/openejb/util ClasspathUtils.java
Log:
Add OPENEJB_HOME resources to CLASSPATH if different than those in
OPENEJB_BASE
Revision Changes Path
1.6 +7 -5
openejb1/modules/core/src/java/org/openejb/util/ClasspathUtils.java
Index: ClasspathUtils.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb1/modules/core/src/java/org/openejb/util/ClasspathUtils.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ClasspathUtils.java 18 Feb 2005 15:38:57 -0000 1.5
+++ ClasspathUtils.java 24 Feb 2005 13:44:53 -0000 1.6
@@ -93,11 +93,13 @@
}
public static void addJarsToPath(String dir, String loaderName,
Hashtable env) throws Exception {
- File dirAtHome = FileUtils.getBase(env).getDirectory(dir);
- if (dirAtHome != null && dirAtHome.exists()) {
+ File dirAtBase = FileUtils.getBase(env).getDirectory(dir);
+ if (dirAtBase != null && dirAtBase.exists()) {
+ addJarsToPath(dirAtBase, loaderName);
+ }
+ File dirAtHome = FileUtils.getHome(env).getDirectory(dir);
+ if (! dirAtHome.equals(dirAtBase)) {
addJarsToPath(dirAtHome, loaderName);
- } else {
- addJarsToPath(FileUtils.getHome(env).getDirectory(dir),
loaderName);
}
}