[modules-dev] "JNI error" message
Kumar Srinivasan
Kumar.Srinivasan at Sun.COM
Fri Sep 7 20:18:16 PDT 2007
Yep, these have been there since day 1, I think these
Exceptions need to be caught in java, display the appropriate
message and return with a non-zero exit code.
I will look at this after the merge, please file a bug.
> Kumar,
>
> I noticed that when I try to launch a module that does not exist, the
> following happens:
>
> ===
> % ./bin/java -module X
> Exception in thread "main" java.lang.IllegalArgumentException: Module not
> found: X
> at
> sun.module.ModuleLauncher.getModuleDefinition(ModuleLauncher.java:253)
> at sun.module.ModuleLauncher.loadModuleClass(ModuleLauncher.java:90)
> Error: A JNI error has occurred, please check your installation and try again
> ===
>
> The last line about the JNI error seems out of place here. I don't know
> how long it has been this way, but I don't think it is something I
> introduced in the merge. I have not looked at this in any detail, but I
> suspect this comes from
>
> 425 } else if (initiateModule) {
> 426 LaunchModule(env, args);
> 427 if ((*env)->ExceptionOccurred(env)) {
> 428 ReportExceptionDescription(env);
> 429 ReportErrorMessage(JNI_ERROR);
> 430 ret=1;
> 431 }
>
> What do you think?
>
> PS: eventually we should also look at how we report other exceptions
> thrown by ModuleLauncher.java
>
> Andreas.
> _______________________________________________
> modules-dev mailing list
> modules-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/modules-dev
>
--
Kumar Srinivasan
Sun Microsystems, Java Software.
408-276-7586
More information about the modules-dev
mailing list