harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Pervov" <pmcfi...@gmail.com>
Subject Re: [drlvm] using the harmony launcher
Date Tue, 18 Jul 2006 09:17:29 GMT
 Andrey,

<SNIP>


> The code for VMStart's init() and shutdown() is equally run regardless
> of whether drlvm is started with it's own or classlib launcher. The
> difference is only in running the user app main() method. Classlib
> launcher calls it directly, through JNI, while the drlvm's launcher
> wraps it into the run() method and always runs in a separate thread.
> I suspect there could be some difference in the classloader's used for
> the user app code, perhaps the drlvm classloading experts could give
> some more details.


Currently the application class is loaded by system class loader (class
loader returned by ClassLoader.getSystemClassLoader() call). Please, see
MainThread.run() in
vm/vmcore/src/kernel_classes/javasrc/java/lang/VMStart.java. The main
question here is what class loader classlib launcher will use to find main
application class. If it calls to jni->FindClass interface function then no
Java frame exists ontop of this call and, again, system class loader will be
user to load main application class. So, no difference actually exists.

<MORE SNIP>

>
> Yes, this sounds reasonable. Then, what should be the expected
> behavior for DestroyVM in case it finds pending exception, should it
> silently ignore it, or report a warning or what? JNI spec doesn't seem
> to specify these details.


AFAIK, JNI specification explicitly declares that no JNI function other than
ExceptionOccured, ExceptionCheck, and ExceptionDescribe are not guaranteed
to work in exception state. So, it is reasonable that the user of JNI
functions (classlib launcher in our case) clears exception (or process it
otherwise) before calling to any JNI function.

With the best regards,
    Pavel Pervov.
Intel Middleware Products Division.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message