jdk/src/share/classes/java/lang/ClassLoader.java
changeset 12298 6e0b65d86fde
parent 11275 7cb0861d512f
child 13589 da4cb574f4a6
--- a/jdk/src/share/classes/java/lang/ClassLoader.java	Tue Mar 27 10:10:47 2012 -0700
+++ b/jdk/src/share/classes/java/lang/ClassLoader.java	Tue Mar 27 21:08:52 2012 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1847,6 +1847,10 @@
             if (loadLibrary0(fromClass, libfile)) {
                 return;
             }
+            libfile = ClassLoaderHelper.mapAlternativeName(libfile);
+            if (libfile != null && loadLibrary0(fromClass, libfile)) {
+                return;
+            }
         }
         if (loader != null) {
             for (int i = 0 ; i < usr_paths.length ; i++) {
@@ -1855,6 +1859,10 @@
                 if (loadLibrary0(fromClass, libfile)) {
                     return;
                 }
+                libfile = ClassLoaderHelper.mapAlternativeName(libfile);
+                if (libfile != null && loadLibrary0(fromClass, libfile)) {
+                    return;
+                }
             }
         }
         // Oops, it failed