RFR: 8329581: Java launcher no longer prints a stack trace

Jaikiran Pai jpai at openjdk.org
Mon May 6 10:23:56 UTC 2024


On Tue, 23 Apr 2024 18:21:30 GMT, Sonia Zaldana Calles <szaldana at openjdk.org> wrote:

>>> Just to clarify, this would still mean converting “isStatic” and “noArgs” from local variables to fields so I am able to read them on the C side of things. Did I understand this correctly?
>> 
>> I'm okay with adding static boolean fields and read by the native code and the name can be explicit like `isStaticMain` and `mainWithNoArg`.
>
> Hi @mlchung, thanks for the feedback! I’ve pushed the updates.
> 
> Just a question about ```NULL_CHECK0```. 
> 
> ```NULL_CHECK0``` reports the error message and then the exception is described in ```CHECK_EXCEPTION_LEAVE```. This results in a stack trace that looks like this: 
> 
> 
> Error: A JNI error has occurred, please check your installation and try again
> Exception in thread "main" java.lang.NoClassDefFoundError: DemoSonia$SomeDependency
> 	at DemoSonia.<clinit>(DemoSonia.java:3)
> Caused by: java.lang.ClassNotFoundException: DemoSonia$SomeDependency
> 	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
> 	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
> 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:528)
> 	... 1 more
> 
> 
> 
> The JNI error message didn’t previously get reported before the regression was introduced, so I just wanted to make sure we were okay with this. 
> 
> Looking forward to your comments!

Hello @SoniaZaldana, I don't remember seeing the `java/lang/Thread/UncaughtExceptionsTest` fail before. It's failing in the current PR's GitHub actions job on several platforms. Could you take a look if it's related to the current changes?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18786#issuecomment-2095648483


More information about the core-libs-dev mailing list