Re: RFR [9] 8139297: java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.jimage.ImageNativeSubstrate

2015-10-09 Thread Mandy Chung
On 10/09/2015 12:37 PM, Alan Bateman wrote: On 09/10/2015 20:26, Jim Laskey (Oracle) wrote: "it should never attempt to use the native implementation” This is confusing. It’s attempting to see if a native library is present otherwise use java. Is this the wrong approach? jrtfs should use

Re: RFR [9] 8139297: java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.jimage.ImageNativeSubstrate

2015-10-09 Thread Alan Bateman
On 09/10/2015 20:43, Jim Laskey (Oracle) wrote: I’m still missing something. How does the jrtfs code ‘know’ it’s in a jar vs part of the jdk9 runtime? In jrtfs then SystemImages has code to look at its code source. -Alan.

Re: RFR [9] 8139297: java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.jimage.ImageNativeSubstrate

2015-10-09 Thread Jim Laskey (Oracle)
I’m still missing something. How does the jrtfs code ‘know’ it’s in a jar vs part of the jdk9 runtime? > On Oct 9, 2015, at 4:37 PM, Alan Bateman wrote: > > > On 09/10/2015 20:33, Chris Hegarty wrote: >> On 9 Oct 2015, at 20:26, Alan Bateman wrote: >> >>> I looked more closely at this and

Re: RFR [9] 8139297: java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.jimage.ImageNativeSubstrate

2015-10-09 Thread Alan Bateman
On 09/10/2015 20:33, Chris Hegarty wrote: On 9 Oct 2015, at 20:26, Alan Bateman 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/i

Re: RFR [9] 8139297: java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.jimage.ImageNativeSubstrate

2015-10-09 Thread Alan Bateman
On 09/10/2015 20:26, Jim Laskey (Oracle) wrote: "it should never attempt to use the native implementation” This is confusing. It’s attempting to see if a native library is present otherwise use java. Is this the wrong approach? jrtfs should use the native implementation when targeting the

Re: RFR [9] 8139297: java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.jimage.ImageNativeSubstrate

2015-10-09 Thread Chris Hegarty
On 9 Oct 2015, at 20:26, Alan Bateman 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/s

Re: RFR [9] 8139297: java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.jimage.ImageNativeSubstrate

2015-10-09 Thread Jim Laskey (Oracle)
"it should never attempt to use the native implementation” This is confusing. It’s attempting to see if a native library is present otherwise use java. Is this the wrong approach? > On Oct 9, 2015, at 4:18 PM, Alan Bateman wrote: > > On 09/10/2015 19:59, Chris Hegarty wrote: >> This is a

Re: RFR [9] 8139297: java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.jimage.ImageNativeSubstrate

2015-10-09 Thread Alan Bateman
I looked more closely at this and I think it's best to handle NCDFE rather than the more general LinkageError. But I hope very temporary, we need to get this code fixed so do the right thing. -Alan

Re: RFR [9] 8139297: java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.jimage.ImageNativeSubstrate

2015-10-09 Thread Alan Bateman
On 09/10/2015 19:59, Chris Hegarty wrote: This is a little temporary solution to get the jrt-fs up and running again with JDK 8, until JDK-8137017 [1] can be resolved. It is fair game for an unchecked Exception or Error thrown during class initialization to result in a NCDFE. The code in BasicIm

RFR [9] 8139297: java.lang.NoClassDefFoundError: Could not initialize class jdk.internal.jimage.ImageNativeSubstrate

2015-10-09 Thread Chris Hegarty
This is a little temporary solution to get the jrt-fs up and running again with JDK 8, until JDK-8137017 [1] can be resolved. It is fair game for an unchecked Exception or Error thrown during class initialization to result in a NCDFE. The code in BasicImageReader should catch java.lang.LinkageErr