[modules-dev] "JNI error" message
Andreas Sterbenz
Andreas.Sterbenz at Sun.COM
Fri Sep 7 18:25:05 PDT 2007
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.
More information about the modules-dev
mailing list