On 9 Oct 2015, at 20:26, Alan Bateman <alan.bate...@oracle.com> wrote:

> I looked more closely at this and I think it's best to handle NCDFE rather 
> than the more general LinkageError.

Ok, I make the follow change before pushing:

diff --git 
a/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java 
b/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java
--- a/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java
+++ b/src/java.base/share/classes/jdk/internal/jimage/BasicImageReader.java
@@ -58,7 +58,7 @@
 
         try {
             substrate = ImageNativeSubstrate.openImage(imagePath, byteOrder);
-        } catch (UnsatisfiedLinkError ex) {
+        } catch (UnsatisfiedLinkError | NoClassDefFoundError ex) {
             substrate = ImageJavaSubstrate.openImage(imagePath, byteOrder);
         } 

> But I hope very temporary, we need to get this code fixed so do the right 
> thing.

I added the follow to JDK-8137017, to ensure this is not forgotten:

  jrt-fs.jar should not depend, directly or indirectly, on JDK internal
  native libraries, e.g. libjimage.

-Chris.

Reply via email to