Author: jfrederic.clere(a)jboss.com
Date: 2009-09-25 10:57:35 -0400 (Fri, 25 Sep 2009)
New Revision: 1180
Modified:
branches/2.1.x/java/org/apache/tomcat/jni/LibraryLoader.java
Log:
Add bin/native in the logic.
Modified: branches/2.1.x/java/org/apache/tomcat/jni/LibraryLoader.java
===================================================================
--- branches/2.1.x/java/org/apache/tomcat/jni/LibraryLoader.java 2009-09-25 12:53:00 UTC
(rev 1179)
+++ branches/2.1.x/java/org/apache/tomcat/jni/LibraryLoader.java 2009-09-25 14:57:35 UTC
(rev 1180)
@@ -140,15 +140,19 @@
dlibName = dlibName.substring(1);
optional = true;
}
- String fullPath = metaPath + path +
+ String fullPath = metaPath + File.separator + path +
File.separator + dlibName;
+ meta = new File(fullPath);
+ if (!meta.exists()) {
+ fullPath = metaPath + File.separator + dlibName;
+ }
try {
Runtime.getRuntime().load(fullPath);
}
catch (Throwable d) {
if (!optional) {
- java.io.File fd = new java.io.File(fullPath);
- if (fd.exists()) {
+ meta = new File(fullPath);
+ if (meta.exists()) {
throw new UnsatisfiedLinkError(" Error: " +
d.getMessage() + " " );
} else {
throw new UnsatisfiedLinkError(" Can't find: " +
fullPath + " ");